dotnet-core-expert

Build .NET 8 microservices with minimal APIs, CQRS, and clean architecture.

98|25|Updated Mar 14, 2020
One-click install
npx skills add https://github.com/baotoq/micro-commerce --skill dotnet-core-expert-baotoq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-core-expert
Source: https://github.com/baotoq/micro-commerce/tree/main/.agents/skills/dotnet-core-expert
Command: npx skills add https://github.com/baotoq/micro-commerce --skill dotnet-core-expert-baotoq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill consolidates best-practice guidance for building .NET 8 microservices with minimal APIs, clean architecture, CQRS, and cloud-native patterns, reducing architectural drift across teams.

Core Features & Use Cases

  • Comprehensive guidance for minimal APIs, MediatR CQRS, EF Core, and JWT authentication.
  • Cloud-native patterns for Docker/Kubernetes, outbox messaging, and OpenAPI documentation.
  • Use Case: When starting a new .NET backend, follow this skill to scaffold an architecture that is maintainable, scalable, and testable.

Quick Start

Create a project skeleton using .NET 8 with a minimal API, clean architecture layers, and OpenAPI documentation.

Frequently Asked Questions about dotnet-core-expert

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

FAQPage Schema
How do I structure a .NET 8 microservice with clean architecture and CQRS?

Structure a .NET 8 microservice by separating clean architecture layers and routing commands and queries through MediatR CQRS workflows. This approach organizes minimal APIs and EF Core data access to ensure your service remains scalable and testable.

What's the best way to implement minimal APIs in .NET 8 with dependency injection?

The best way to implement minimal APIs in .NET 8 is to wire dependency injection directly into endpoint definitions alongside MediatR request handling. This pattern keeps API gateways lightweight while supporting async I/O and AOT compilation.

Can I use MediatR CQRS with EF Core in a minimal API project?

Yes, you can use MediatR CQRS with EF Core in a minimal API project. The CQRS pattern separates read and write workflows, allowing EF Core to handle database operations while MediatR dispatches commands and queries asynchronously.

How do I add JWT authentication to a .NET 8 minimal API?

Add JWT authentication to a .NET 8 minimal API by configuring the authentication middleware in your dependency injection container. This secures your clean architecture endpoints by validating tokens before MediatR processes incoming requests.

Does .NET 8 minimal API support AOT compilation and OpenAPI documentation?

Yes, .NET 8 minimal APIs support AOT compilation and OpenAPI documentation. Designing your microservices with minimal APIs allows you to generate OpenAPI specs automatically while optimizing startup performance through ahead-of-time compilation.

When should I use the outbox pattern in .NET 8 microservices?

Use the outbox pattern in .NET 8 microservices when you need reliable messaging across distributed systems. This cloud-native pattern ensures database state changes and outbox messages are saved together, preventing data inconsistency in Docker and Kubernetes deployments.