← ClaudeAtlas

csharplisted

C#/.NET minimal API, Entity Framework Core, dependency injection, background services, middleware, LINQ
Claudient/Claudient · ★ 4 · AI & Automation · score 65
Install: claude install-skill Claudient/Claudient
# C#/.NET Skill ## When to activate - Building a .NET Web API (minimal API or controller-based) - Setting up Entity Framework Core with migrations - Configuring the .NET dependency injection container - Writing background services with `IHostedService` or `BackgroundService` - Implementing middleware pipeline components - Writing LINQ queries and understanding deferred execution - Setting up async/await correctly in ASP.NET Core ## When NOT to use - Node.js or Python services - .NET Framework (pre-.NET 5) legacy codebases — patterns differ - Blazor or MAUI frontend — different concerns - Unity game development — different runtime ## Instructions ### Project structure ``` MyApi/ ├── MyApi.sln ├── src/ │ └── MyApi/ │ ├── Program.cs # Entry point + DI container │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── Controllers/ # Controller-based API │ ├── Endpoints/ # Minimal API extensions │ ├── Models/ # EF Core entities │ ├── DTOs/ # Request/response shapes │ ├── Services/ # Business logic interfaces + implementations │ ├── Data/ │ │ └── AppDbContext.cs │ └── Middleware/ └── tests/ └── MyApi.Tests/ ``` ### Program.cs — minimal API setup ```csharp // Program.cs — .NET 6+ top-level statements + minimal API var builder = WebApplication.CreateBuilder(args); // Register services builder.Services.AddDbContext<