dotnet8-standards
Installation
SKILL.md
.NET 8 Coding Standards
Overview
These standards ensure consistent, modern C# code across the codebase. Follow these patterns for all .NET 8 development.
C# 12 Syntax
Primary Constructors
Use primary constructors for dependency injection:
// Good - primary constructor
public class TaskService(ITaskRepository repository, ILogger<TaskService> logger)
{
public async Task<TaskItem> GetByIdAsync(Guid id) => await repository.GetByIdAsync(id);
}