Marketplace
Browse and adopt engineering standards, rules, and configurations. Fork to customize for your organization.
Use ASP.NET Core for C# web apps
csharp
ASP.NET Core for web APIs and apps. Minimal APIs for simple endpoints. MVC for complex. DI built-in.
Use async/await properly
csharp
Async all the way down. Return `Task<T>`, never block with `.Result` or `.Wait()`. ConfigureAwait unnecessary in ASP.NET Core.
Use C# 12+ features
csharp
Primary constructors, collection expressions, default lambda params. Required members. Raw string literals. .NET 8+ for best support.
Use .NET CLI and NuGet
csharp
`dotnet` CLI for builds/runs. NuGet for packages. Lock file with `packages.lock.json`. .NET 8+.
Use .NET SDK for C# projects
csharp
.NET SDK for builds and tooling. `dotnet new` for scaffolding. `dotnet run` for dev. .NET 8+ LTS.
Use nullable reference types
csharp
Enable `<Nullable>enable</Nullable>`. Mark nullable with `?`. Compiler catches null issues.
Use xUnit or NUnit for testing
csharp
xUnit preferred (modern, parallel). NUnit also good. Use `[Fact]`/`[Theory]` or `[Test]`/`[TestCase]`.
Follow .NET naming conventions
csharp
PascalCase for public members, camelCase for private. Use dotnet-format or StyleCop. Async suffix for async methods.
Use minimal APIs for simple endpoints
csharp
Minimal APIs for simple microservices and endpoints. MapGet/MapPost with lambdas. MVC for complex scenarios with views.