claude-meta/memory/dotnet-patterns.md

21 lines
590 B
Markdown

# .NET Patterns
## EF Core
- Always use `AsNoTracking()` for read-only queries
- Migrations: one migration per feature, meaningful names
- Use `IQueryable` in repositories, materialize in services
## Fluxor State Management
- One state per feature area
- Effects for async operations (API calls, DB)
- Reducers pure functions, no side effects
## gRPC
- Use streaming for large data sets
- Implement cancellation tokens through the chain
- Proto files define contract, generate C# code
## AutoMapper
- Profiles per feature area
- Map in application layer, not domain