Bootcamp
A focused two-week sprint to get production-ready in modern C#.
Bootcamp plan + a minimal API skeleton
EXAMPLE
# C# bootcamp - 10 working days
Day 1 - Tooling: dotnet CLI, solutions, projects, NuGet, EditorConfig.
Day 2 - Types: value vs reference, records, structs, nullable reference types.
Day 3 - Collections + LINQ: IEnumerable, Where, Select, GroupBy, deferred execution.
Day 4 - Async: Task, async/await, ConfigureAwait, cancellation tokens.
Day 5 - DI + config: Microsoft.Extensions.DependencyInjection, IOptions, IConfiguration.
Weekend project: a CLI that reads a CSV, queries it with LINQ, writes JSON.
Day 6 - ASP.NET Core minimal APIs: routing, model binding, validation.
Day 7 - EF Core: DbContext, migrations, query translation, AsNoTracking.
Day 8 - Testing: xUnit, FluentAssertions, WebApplicationFactory for integration tests.
Day 9 - Observability: Serilog, OpenTelemetry, health checks.
Day 10 - Deployment: Docker multi-stage build, Kestrel tuning, graceful shutdown.
Capstone: ship a small API with EF Core, integration tests, and a Dockerfile.
# Day 6 starter - minimal API in 20 lines
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<AppDb>(o => o.UseNpgsql(builder.Configuration.GetConnectionString('Db')));
var app = builder.Build();
app.MapGet('/healthz', () => 'ok');
app.MapPost('/users', async (CreateUser body, AppDb db) => {
var u = new User(body.Email, body.Name);
db.Users.Add(u);
await db.SaveChangesAsync();
return Results.Created($'/users/{u.Id}', u);
});
app.Run();
record CreateUser(string Email, string Name);
class User(string email, string name) { public int Id { get; set; } public string Email { get; } = email; public string Name { get; } = name; }
Why it matters
This pace is aggressive but realistic if you have prior OO experience. Skip nothing - C# rewards depth in async and EF Core.
Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.
Discussion
Loading…