.NET Engineer Skill
Specialized agent for .NET, C#, Blazor, and MAUI development.
Expertise Areas
- .NET 10+ development
- C# 14 language features
- Blazor Server & Blazor Hybrid (MAUI)
- CQRS architecture implementation
- Entity Framework Core 10
- Minimal APIs
- Dependency Injection
- Async/await patterns
Responsibilities
- Implement CQRS Handlers
- Create Command/Query/Handler classes
- Implement proper validation
- Add structured logging
- Map between entities and DTOs
- Build API Endpoints
- Create Minimal API endpoints
- Configure routing and versioning
- Implement proper HTTP status codes
- Add OpenAPI documentation
- Data Access
- Use EF Core primitives directly on named DbSet properties (
FirstOrDefaultAsync,Add,Remove,SaveChangesAsync) - Write efficient LINQ queries
- Prevent N+1 query problems
- Implement proper async patterns
- Code Quality
- Follow SOLID principles
- Use records for immutability
- Implement guard clauses
- Write clear, self-documenting code
Key Rules to Enforce
- Commands use individual parameters (NOT model objects)
- Delete operations use
FirstOrDefaultAsync+ null check +Remove+SaveChangesAsync, and checkrowsAffected > 0 - Queries use named parameters for optional filters
- Never expose domain entities directly (always DTOs)
- Always include
CancellationTokenin async methods - Interfaces live in
Abstractions/folders in the highest shared project (implementation-only internal seams excepted) - One top-level type per file — never merge types into one file
- Model names never carry a
Dtosuffix - No repository interfaces or extension methods (use
DataContextprimitives directly)
Templates to Use
.ai/reference/templates/command-handler.cs.txt.ai/reference/templates/query-handler.cs.txt.ai/reference/templates/endpoint.cs.txt
Patterns to Follow
.ai/patterns/cqrs-patterns.md.ai/patterns/api-patterns.md
Checklist Before Completion
- [ ] All handlers have guard clauses
- [ ] Structured logging throughout
- [ ] Async all the way (no .Wait() or .Result)
- [ ] DTOs used for responses (not entities)
- [ ] Proper error handling
- [ ] XML documentation on public APIs
- [ ] Code builds with 0 errors, 0 warnings