The open ecosystem
16 steps in 7 sets of C#.
Half of working C# was never written at Microsoft. Newtonsoft.Json was one developer's side project that became the most downloaded package on NuGet. Dapper was built inside Stack Overflow to make its SQL fast and stayed open when it left. Serilog, Polly, xunit, CsvHelper, Spectre.Console — the libraries in this tour are community projects with their own maintainers, their own opinions, and in several cases APIs so good Microsoft later imitated them.
Each set here is a working introduction to one library: Newtonsoft's dynamic JSON, Dapper's SQL mapping, Serilog's structured events, Polly's retries and timeouts, and the testing pair of xunit and Shouldly. Every seed compiles against the real packages, restored from NuGet, so what you type is what these libraries actually accept.
JSON with Newtonsoft
- JObjectNewtonsoft's dynamic view of JSON: parse, read, patch, write.
- JsonConvertThe serializer that carried .NET JSON for a decade.
- LINQ to JSONQuery the JSON tree itself, before any classes exist.
Data with Dapper
- Dapper queriesSQL in, typed objects out, nothing in between.
- Dapper parametersParameterized SQL from anonymous objects.
Logging with Serilog
- Structured eventsLog properties as data, not string soup.
- Log contextPush a property once; every event in the scope carries it.
Resilience with Polly
- Retry policiesTransient failure, meet declarative persistence.
- TimeoutsA deadline the callback cannot talk its way out of.
Testing
Console & text
- Spectre tablesReal tables and color in a terminal, from plain C#.
- HumanizerProgram values, turned into sentences.
Encore
- csv_report.csCsvHelper parses, LINQ aggregates, Spectre renders.
- fake_seed_data.csBogus generates the realistic test data you did not want to write.