dotnet-backend-patterns

Automate .NET backend pattern adoption with clean architecture and DI.

7|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Harmeet10000/skills --skill dotnet-backend-patterns-harmeet10000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-backend-patterns
Source: https://github.com/Harmeet10000/skills/tree/main/skills/backend/dotnet-backend-patterns
Command: npx skills add https://github.com/Harmeet10000/skills --skill dotnet-backend-patterns-harmeet10000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes and codifies robust .NET backend patterns to help teams build maintainable, scalable APIs with clear architecture, DI, and testing practices.

Core Features & Use Cases

  • Clean Architecture blueprint (Domain, Application, Infrastructure, Api) to separate concerns and improve testability.
  • Comprehensive dependency injection patterns with lifetimes, factories, and configuration-based choices.
  • Async/await best practices, cancellation tokens, and safe parallelism to maximize throughput.
  • Configuration management using IOptions, IOptionsSnapshot, and IOptionsMonitor for dynamic and typed settings.
  • Data access guidance for EF Core and Dapper, including patterns for repositories, pagination, and performance tips.
  • Testing guidance with xUnit and FluentValidation to enforce quality and reliability.

Quick Start

Create a new .NET API project and structure it according to the Clean Architecture blueprint described above.

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 API using clean architecture?

Manage .NET configuration using IOptions, IOptionsSnapshot, and IOptionsMonitor to enable dynamic and strongly-typed settings. These patterns provide typed access to configuration data and support reactive updates across your backend services.

What is the best way to implement dependency injection in .NET backend projects?

Implement comprehensive dependency injection patterns in .NET by configuring service lifetimes, factories, and configuration-based choices. This standardizes DI registration across your API services and enterprise backends for maintainable code.

How do I handle async await and cancellation tokens in C# APIs?

Apply async/await best practices in C# APIs by utilizing cancellation tokens and ensuring safe parallelism. This asynchronous programming discipline maximizes throughput and prevents blocking calls in scalable .NET backend services.

Can I use EF Core and Dapper for data access in a clean architecture project?

Yes, you can use EF Core and Dapper for data access within a clean architecture project. Guidance includes repository patterns, pagination implementation, and performance tips to optimize database operations in .NET APIs.

How do I test .NET APIs with xUnit and FluentValidation?

Test .NET APIs using xUnit and FluentValidation to enforce quality and reliability across testable components. This testing guidance standardizes validation and unit testing practices within your clean architecture layers.