dotnet-backend-patterns

Document .NET backend patterns for architecture, DI, EF Core, and Dapper.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/Sumeet138/qwen-code-agents --skill dotnet-backend-patterns-sumeet138
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-backend-patterns
Source: https://github.com/Sumeet138/qwen-code-agents/tree/main/plugins/dotnet-contribution/skills/dotnet-backend-patterns
Command: npx skills add https://github.com/Sumeet138/qwen-code-agents --skill dotnet-backend-patterns-sumeet138

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a comprehensive blueprint for building robust .NET backends, including patterns for architecture, dependency injection, data access with EF Core and Dapper, configuration, caching, and testing, to accelerate delivery and maintainable code.

Core Features & Use Cases

  • Project Structure (Clean Architecture): Organizes Core domain, application services, infrastructure, and APIs for clear boundaries.
  • Dependency Injection & Configuration: Offers structured DI registrations, IOptions usage, and factory-based service patterns for flexibility.
  • Async/Await & Performance: Promotes non-blocking I/O, value tasks, and parallel patterns for responsive APIs.
  • Data Access Patterns: Demonstrates EF Core repositories and high-performance Dapper queries with mapping strategies.
  • Caching & Testing: Provides caching strategies and testing approaches (unit and integration) to ensure reliability.
  • Use cases include scaffolding production-grade APIs, MCP-like services, and enterprise backends with maintainable code.

Quick Start

Clone the repository and inspect the sample solution to see Clean Architecture, DI, EF Core, and Dapper patterns implemented in a runnable .NET backend.

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 using clean architecture and dependency injection?

Structure a .NET backend by organizing Core domain, application services, infrastructure, and APIs for clear boundaries. This clean architecture approach uses structured dependency injection registrations and factory-based service patterns to separate concerns and accelerate delivery of maintainable code.

What's the best way to handle data access with EF Core and Dapper in .NET APIs?

Handle .NET data access by using EF Core repositories for standard data operations and high-performance Dapper queries for complex reads. This pattern includes mapping strategies to optimize performance, ensuring responsive APIs through non-blocking I/O and value tasks.

How does result-based error handling work in .NET backend services?

Result-based error handling in .NET backend services provides a structured way to return failures without throwing exceptions. It fulfills requirements for robust APIs by cleanly separating success and error states, accelerating the delivery of maintainable and reliable enterprise backends.

Can I use IOptions for strong configuration in .NET microservices?

Yes, you can use IOptions for strong configuration in .NET microservices. The pattern offers structured IOptions usage to validate and bind configuration settings, ensuring flexibility and reliability when building robust APIs and enterprise backends.

What testing approaches should I use for .NET backend patterns?

Use both unit and integration testing approaches to ensure reliability in .NET backend patterns. These testing strategies validate architecture, dependency injection, and data access components, ensuring that production-grade APIs and services maintain high quality and maintainable code.

When should I use async/await and parallel patterns for responsive .NET APIs?

Use async/await and parallel patterns in .NET APIs whenever performing I/O operations to keep endpoints responsive. The approach promotes non-blocking I/O and value tasks, which are essential for high-performance data access and scalable microservices.