Logging in .NET with Serilog: Structured Logs Done Right
Set up logging in .NET with Serilog: message templates, ILogger, sinks, enrichers, appsettings configuration, request logging, and correlation ids.
Category
Practical .NET, C#, ASP.NET Core, and EF Core guides, from installing the SDK to deploying with CI/CD.
21 articles
Set up logging in .NET with Serilog: message templates, ILogger, sinks, enrichers, appsettings configuration, request logging, and correlation ids.
Build background jobs in .NET with BackgroundService and IHostedService: worker template, scoped services, PeriodicTimer, Channel queues, graceful stop.
Understand clean architecture in .NET: domain, application, infrastructure, and API layers, the dependency rule, and when it helps…
Integration testing for ASP.NET Core APIs with WebApplicationFactory: expose Program, replace services, test databases, and authenticated requests.
Start unit testing in .NET with xUnit: Facts and Theories, Arrange-Act-Assert, naming, NSubstitute test doubles, and running everything…
Find and fix the EF Core N+1 problem and more: AsNoTracking, Select projections, logging SQL, Include vs split…
Ship EF Core migrations safely: add and remove migrations, generate SQL scripts and bundles, avoid startup Migrate() races,…
Configure EF Core relationships: one-to-many, many-to-many with skip navigations, one-to-one, foreign key conventions, HasOne and WithMany, delete behavior.
Start with Entity Framework Core code first: entities, DbContext, provider choice, dotnet ef tooling, conventions vs fluent API,…
Handle ASP.NET Core error handling with RFC 9457 Problem Details: AddProblemDetails, IExceptionHandler, validation, trace ids, and no stack…
Add ASP.NET Core authentication and authorization to a Web API: JWT bearer and cookies, claims, roles, policies, and…
Master dependency injection in ASP.NET Core: transient, scoped, and singleton lifetimes, captive dependencies, the options pattern, and keyed…
Build an ASP.NET Core Web API end to end: controllers, attribute routing, model binding and validation, DTOs, status…
Understand ASP.NET Core middleware: pipeline order, Use, Run, and Map, writing custom middleware classes, endpoint routing, and how…