Update .gitignore to include additional file types and directories for Python projects, enhancing environment management and build artifacts exclusion.

This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-20 21:28:16 +02:00
parent 9e5b0f2cc2
commit 7556f3b012
65 changed files with 9165 additions and 7 deletions
+17
View File
@@ -0,0 +1,17 @@
---
description: ".NET/C# coding conventions: naming, async patterns, DI, EF Core, error handling, layered architecture"
globs: ["**/*.cs", "**/*.csproj", "**/*.sln"]
---
# .NET / C#
- PascalCase for classes, methods, properties, namespaces; camelCase for locals and parameters; prefix interfaces with `I`
- Use `async`/`await` for I/O-bound operations, do not suffix async methods with Async
- Use dependency injection via constructor injection; register services in `Program.cs`
- Use linq2db for small projects, EF Core with migrations for big ones; avoid raw SQL unless performance-critical; prevent N+1 with `.Include()` or projection
- Use `Result<T, E>` pattern or custom error types over throwing exceptions for expected failures
- Use `var` when type is obvious; prefer LINQ/lambdas for collections
- Use C# 10+ features: records for DTOs, pattern matching, null-coalescing
- Layer structure: Controllers -> Services (interfaces) -> Repositories -> Data/EF contexts
- Use Data Annotations or FluentValidation for input validation
- Use middleware for cross-cutting: auth, error handling, logging
- API versioning via URL or header; document with XML comments for Swagger/OpenAPI