dotnet-backend-patterns

Provides .NET backend API architectural patterns and templates.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill dotnet-backend-patterns-leonardoteodoroo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-backend-patterns
Source: https://github.com/leonardoteodoroo/amino-advanced/tree/main/.agent/skills/dotnet-backend-patterns
Command: npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill dotnet-backend-patterns-leonardoteodoroo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and practical templates for building production-grade C#/.NET backends, reducing boilerplate and ensuring scalable architecture.

Core Features & Use Cases

  • Clean Architecture blueprint: organizes Domain, Application, Infrastructure, and API layers for maintainability.
  • DI and configuration patterns: demonstrates proper lifetime management, Options pattern, and runtime configuration.
  • Data access strategies: showcases EF Core and Dapper data access with safe querying, paging, and mapping.
  • Resilience and testing: includes patterns for error handling, caching, and unit/integration testing with xUnit.

Quick Start

Create a new .NET backend project using the Clean Architecture structure, configure DI, EF Core and Dapper repositories, and apply the options pattern and caching as shown.

Frequently Asked Questions about dotnet-backend-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a .NET backend API using Clean Architecture?

Organize a .NET backend API into Domain, Application, Infrastructure, and API layers to ensure maintainability and scalable separation of concerns across service-oriented backends.

What is the best way to manage Dependency Injection lifetimes in .NET?

The best way to manage Dependency Injection lifetimes in .NET is to apply proper lifetime mapping during DI wiring, ensuring services are resolved safely according to their scoped or singleton requirements.

Should I use EF Core or Dapper for data access in my .NET backend?

You can use both EF Core and Dapper for data access in a .NET backend. Implement the repository pattern to safely query, page, and map data using either ORM within your Infrastructure layer.

How do I implement caching and invalidation patterns in .NET?

To implement caching and invalidation patterns in .NET, apply the provided caching templates to reduce database load, managing cache expiration and data consistency within your application services.

How do you set up unit and integration testing for a .NET backend API?

Set up unit and integration testing for a .NET backend API using xUnit alongside test-friendly templates, ensuring repositories and application logic are validated through proper dependency injection mocking.

Can I use the Options pattern for runtime configuration in .NET backend services?

Yes, you can use the IOptions pattern for runtime configuration in .NET backend services to strongly type application settings and bind them safely during your dependency injection setup.