Pular para o conteúdo
Kitbay
Skill

dotnet-backend-patterns

MITAtualizado em 9 de nov. de 202642.406Estrelas no GitHub

A long reference skill in the .NET contribution plugin of the wshobson/agents collection with C# and .NET backend patterns for APIs, MCP servers and business applications, for use when building .NET backends, reviewing C# code or designing APIs.

O que a skill ensina

A long reference skill in the .NET contribution plugin of the wshobson/agents collection with C# and .NET backend patterns for APIs, MCP servers and business applications, for use when building .NET backends, reviewing C# code or designing APIs. It covers a clean architecture project layout, dependency injection lifetimes and keyed services, async code and its anti-patterns, options-based configuration, a result type in place of exceptions for business failures, Entity Framework Core setup, query filters and paged repositories, Dapper queries with multi-mapping, layered caching with Redis and stale-while-revalidate, and unit and integration tests with xUnit, Moq and WebApplicationFactory. It ends with do and do-not lists and common pitfalls such as N+1 queries.

O que faz

  • Lay out a .NET backend in clean architecture layers
  • Use EF Core and Dapper for data access
  • Add layered caching with Redis
  • Write xUnit unit and integration tests