dotnet-idioms

Recommend idiomatic .NET 8+ patterns for endpoints, EF Core, configuration, middleware, and testing.

150|48|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/irahardianto/awesome-agv --skill dotnet-idioms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-idioms
Source: https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/dotnet-idioms
Command: npx skills add https://github.com/irahardianto/awesome-agv --skill dotnet-idioms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid non-idiomatic .NET code patterns by standardizing how you structure endpoints, data access, configuration, middleware, and testing for .NET 8+.

Core Features & Use Cases

  • Minimal APIs vs. Controllers: Choose the right endpoint style for simple routes or complex behaviors, keeping request/response logic clear and maintainable.
  • Entity Framework Core best practices: Apply scoped DbContext usage, migrations via CLI, efficient read-only querying, and performance-aware patterns like compiled queries.
  • Strongly-typed configuration and middleware: Use IOptions<T> for configuration clarity and implement cross-cutting concerns through consistent middleware design.
  • Testing that scales: Prefer xUnit + FluentAssertions, use WebApplicationFactory for integration tests, and keep test databases clean with Respawn.

Quick Start

Use the dotnet-idioms skill to propose an idiomatic .NET 8 design for the service by aligning endpoints, EF Core usage, configuration, middleware, and testing conventions with the skill’s patterns.

Frequently Asked Questions about dotnet-idioms

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

FAQPage Schema
How do I structure minimal APIs versus controllers in .NET 8?

Choosing between minimal APIs and controllers in .NET 8 involves using minimal APIs for simple routes and controllers for complex behaviors. This approach keeps request and response logic clear while ensuring your endpoints remain highly maintainable.

What are the best practices for Entity Framework Core configuration and usage?

Entity Framework Core best practices include applying scoped DbContext usage, running migrations via CLI, and utilizing efficient read-only querying. You should also implement performance-aware patterns like compiled queries to optimize data access in .NET 8.

How do I configure strongly-typed settings and middleware in .NET 8?

To configure strongly-typed settings in .NET 8, use IOptions<T> for configuration clarity. You can implement cross-cutting concerns through consistent middleware design, ensuring your application remains clean and idiomatic throughout its processing pipeline.

What is the best way to set up xUnit unit and integration tests for .NET 8?

The best way to set up xUnit testing in .NET 8 is to pair xUnit with FluentAssertions. You should use WebApplicationFactory for integration tests and keep test databases clean with Respawn to ensure your testing conventions scale reliably.

When should I use compiled queries in EF Core?

You should use compiled queries in EF Core when you need performance-aware patterns for high-frequency data access. This approach aligns with idiomatic .NET 8 practices by optimizing read-only querying and ensuring efficient scoped DbContext usage.