---
# System prepended metadata

title: 2018 ASP.NET MVC5 CheatSheet

---

# 2018 ASP.NET MVC5 CheatSheet

## Bundling

自動最佳化 Bundling

```csharp=

BundleTable.EnableOptimizations = true;

```

取得 AD user groups

```csharp=
var groupNames = from id in System.Security.Principal.WindowsIdentity.GetCurrent().Groups
                 select id.Translate(typeof(System.Security.Principal.NTAccount)).Value;

foreach (var item in groupNames)
{
    Console.WriteLine(item);
}
```