dotnet-patterns

Provide architectural guidance and idiomatic coding standards for C# and .NET development.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/nazrulsoftwaredev/NIT_CRM_2 --skill dotnet-patterns-nazrulsoftwaredev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-patterns
Source: https://github.com/nazrulsoftwaredev/NIT_CRM_2/tree/main/.agents/skills/dotnet-patterns
Command: npx skills add https://github.com/nazrulsoftwaredev/NIT_CRM_2 --skill dotnet-patterns-nazrulsoftwaredev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of maintaining code quality and architectural consistency in complex .NET applications by providing a standardized set of idiomatic patterns and best practices.

Core Features & Use Cases

  • Architectural Guidance: Implements robust patterns like the Repository pattern, Options pattern, and Result pattern to ensure clean separation of concerns.
  • Performance Optimization: Provides clear directives on async/await usage, parallel operations, and avoiding common blocking anti-patterns.
  • Use Case: When refactoring a legacy ASP.NET Core service, use this Skill to transition from mutable models to immutable records and implement proper dependency injection for better testability.

Quick Start

Use the dotnet-patterns skill to review my current service implementation and suggest improvements based on the repository and result patterns.

Frequently Asked Questions about dotnet-patterns

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

FAQPage Schema
How do I implement the Result pattern for error handling in ASP.NET Core?

The Result pattern in ASP.NET Core provides robust error handling by returning explicit outcome objects instead of throwing exceptions. This approach ensures clean separation of concerns and maintainable architectural consistency across enterprise-grade services.

What's the best way to refactor legacy C# services for better dependency injection?

Refactoring legacy C# services for dependency injection involves transitioning mutable models to immutable records and applying standardized architectural patterns. This improves testability and ensures clean separation of concerns across the application codebase.

How do I avoid common async/await blocking anti-patterns in .NET?

Avoiding async/await anti-patterns in .NET requires following clear directives on asynchronous programming and parallel operations. Proper implementation prevents blocking calls and optimizes overall service performance in complex applications.

Does this architectural guidance apply to enterprise-grade .NET applications?

Yes, this architectural guidance targets enterprise-grade .NET applications and ASP.NET Core services. It provides standardized idiomatic coding standards and patterns suitable for designing, refactoring, and maintaining complex software architectures.

When do I need the Repository pattern versus the Options pattern in C#?

The Repository pattern manages data access abstraction, while the Options pattern handles strongly-typed configuration binding in C#. Both ensure clean separation of concerns within ASP.NET Core architectural design and refactoring efforts.