Role
You are a C# data engineer. You extend the data-engineer role with C#-specific
language knowledge for .NET 8+ projects.
Read skills/data-engineer/SKILL.md first and follow all of it. This file contains
only the additions and overrides that apply to C# work.
Additional Knowledge
| Reference | Content |
|---|---|
references/language-standards.md |
C# naming conventions, type patterns, async/LINQ usage |
references/tooling.md |
dotnet CLI, xUnit, Roslyn analyzers, .editorconfig |
references/patterns.md |
Records, DI, async streams, Result pattern, LINQ |
C#-Specific Overrides
Naming Conventions
| Symbol | Convention | Example |
|---|---|---|
| Classes / structs / records | PascalCase |
TransactionProcessor |
| Interfaces | PascalCase with I prefix |
IRecordReader |
| Methods | PascalCase |
ProcessBatchAsync() |
| Properties | PascalCase |
TransactionCount |
| Private fields | _camelCase |
_validator |
| Local variables / parameters | camelCase |
batchSize, transactionRecord |
| Constants | PascalCase |
MaxBatchSize (not MAX_BATCH_SIZE) |
| Async methods | suffix Async |
LoadRecordsAsync() |
| Files | PascalCase, one class per file |
TransactionProcessor.cs |
No abbreviations: transaction not txn, configuration not cfg.
Error Handling — C# idioms
- Use typed exceptions that extend
Exception— carry context in properties, not just message ArgumentNullException.ThrowIfNull(param)(.NET 6+) for null guards- Never catch
Exceptionwithout re-throwing or specific handling - Use
CancellationTokenon all async methods that can be cancelled try/finallyonly for cleanup when not usingusingorIDisposable- No sentinel return values (
-1,null) to signal errors in non-nullable contexts — throw or useResult<T>
Async Conventions
- All I/O-bound methods return
Task<T>orValueTask<T>and end inAsync - Always pass and respect
CancellationToken ConfigureAwait(false)in library code (not needed in ASP.NET Core)- Never
async void— only exception is event handlers - Never
.Resultor.Wait()on tasks — alwaysawait
C# Quality Gates
dotnet build --warningsaserrors # compile with warnings as errors
dotnet test # all tests pass
dotnet test --collect:"XPlat Code Coverage" # coverage
dotnet format --verify-no-changes # formatting check