Enterprise C# 13 development with .NET 9, async/await, LINQ, Entity Framework
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
skills listSkill Instructions
name: "moai-lang-csharp" description: "C# 12 / .NET 8 development specialist covering ASP.NET Core, Entity Framework, Blazor, and modern C# patterns. Use when developing .NET APIs, web applications, or enterprise solutions." version: 2.0.0 category: "language" modularized: true allowed-tools: "Read, Grep, Glob, mcp__context7__resolve-library-id, mcp__context7__get-library-docs" context7-libraries: ['/dotnet/aspnetcore', '/dotnet/efcore', '/dotnet/runtime'] updated: 2026-01-06 status: "active"
C# 12 / .NET 8 Development Specialist
Modern C# development with ASP.NET Core, Entity Framework Core, Blazor, and enterprise patterns.
Quick Reference
Auto-Triggers: .cs, .csproj, .sln files, C# projects, .NET solutions, ASP.NET Core applications
Core Stack:
- C# 12: Primary constructors, collection expressions, alias any type, default lambda parameters
- .NET 8: Minimal APIs, Native AOT, improved performance, WebSockets
- ASP.NET Core 8: Controllers, Endpoints, Middleware, Authentication
- Entity Framework Core 8: DbContext, migrations, LINQ, query optimization
- Blazor: Server/WASM components, InteractiveServer, InteractiveWebAssembly
- Testing: xUnit, NUnit, FluentAssertions, Moq
Quick Commands:
# Create .NET 8 Web API project
dotnet new webapi -n MyApi --framework net8.0
# Create Blazor Web App
dotnet new blazor -n MyBlazor --interactivity Auto
# Add Entity Framework Core
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Design
# Add FluentValidation and MediatR
dotnet add package FluentValidation.AspNetCore
dotnet add package MediatR
Module Index
This skill uses progressive disclosure with specialized modules for deep coverage:
Language Features
- C# 12 Features - Primary constructors, collection expressions, type aliases, default lambdas
Web Development
- ASP.NET Core 8 - Minimal API, Controllers, Middleware, Authentication
- Blazor Components - Server, WASM, InteractiveServer, Components
Data Access
- Entity Framework Core 8 - DbContext, Repository pattern, Migrations, Query optimization
Architecture Patterns
- CQRS and Validation - MediatR CQRS, FluentValidation, Handler patterns
Reference Materials
- API Reference - Complete API reference, Context7 library mappings
- Code Examples - Production-ready examples, testing templates
Implementation Quick Start
Project Structure (Clean Architecture)
src/
├── MyApp.Api/ # ASP.NET Core Web API
│ ├── Controllers/ # API Controllers
│ ├── Endpoints/ # Minimal API endpoints
│ └── Program.cs # Application entry
├── MyApp.Application/ # Business logic layer
│ ├── Commands/ # CQRS Commands
│ ├── Queries/ # CQRS Queries
│ └── Validators/ # FluentValidation
├── MyApp.Domain/ # Domain entities
│ ├── Entities/ # Domain models
│ └── Interfaces/ # Repository interfaces
└── MyApp.Infrastructure/ # Data access layer
├── Data/ # DbContext
└── Repositories/ # Repository implementations
Essential Patterns
Primary Constructor with DI:
public class UserService(IUserRepository repository, ILogger<UserService> logger)
{
public async Task<User?> GetByIdAsync(Guid id)
{
logger.LogInformation("Fetching user {UserId}", id);
return await repository.FindByIdAsync(id);
}
}
Minimal API Endpoint:
app.MapGet("/api/users/{id:guid}", async (Guid id, IUserService service) =>
{
var user = await service.GetByIdAsync(id);
return user is not null ? Results.Ok(user) : Results.NotFound();
})
.WithName("GetUser")
.WithOpenApi();
Entity Configuration:
public class UserConfiguration : IEntityTypeConfiguration<User>
{
public void Configure(EntityTypeBuilder<User> builder)
{
builder.HasKey(u => u.Id);
builder.Property(u => u.Email).HasMaxLength(256).IsRequired();
builder.HasIndex(u => u.Email).IsUnique();
}
}
Context7 Integration
For latest documentation, use Context7 MCP tools:
# ASP.NET Core documentation
mcp__context7__resolve-library-id("aspnetcore")
mcp__context7__get-library-docs("/dotnet/aspnetcore", "minimal-apis middleware")
# Entity Framework Core documentation
mcp__context7__resolve-library-id("efcore")
mcp__context7__get-library-docs("/dotnet/efcore", "dbcontext migrations")
# .NET Runtime documentation
mcp__context7__resolve-library-id("dotnet runtime")
mcp__context7__get-library-docs("/dotnet/runtime", "collections threading")
Quick Troubleshooting
Build and Runtime:
dotnet build --verbosity detailed # Detailed build output
dotnet run --launch-profile https # Run with HTTPS profile
dotnet ef database update # Apply EF migrations
dotnet ef migrations add Initial # Create new migration
Common Patterns:
// Null reference handling
var user = await context.Users.FindAsync(id);
ArgumentNullException.ThrowIfNull(user, nameof(user));
// Async enumerable for streaming
public async IAsyncEnumerable<User> StreamUsersAsync(
[EnumeratorCancellation] CancellationToken ct = default)
{
await foreach (var user in context.Users.AsAsyncEnumerable().WithCancellation(ct))
{
yield return user;
}
}
Works Well With
moai-domain-backend- API design, database integration patternsmoai-platform-deploy- Azure, Docker, Kubernetes deploymentmoai-workflow-testing- Testing strategies and patternsmoai-foundation-quality- Code quality standardsmoai-essentials-debug- Debugging .NET applications
More by modu-ai
View allPython 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.
Flutter 3.24+ / Dart 3.5+ development specialist covering Riverpod, go_router, and cross-platform patterns. Use when building cross-platform mobile apps, desktop apps, or web applications with Flutter.
Enterprise template management with code boilerplates, feedback templates, and project optimization workflows
Enterprise Mermaid diagramming skill for Claude Code using MCP Playwright. Use when creating architecture diagrams, flowcharts, sequence diagrams, or visual documentation.