Newsletter

Get the Thursday issue.

One focused C# tutorial. Free, and easy to leave.

  • 4,000+ engineers
  • 100+ tutorials

Writing

All posts

Practical C#, .NET, and ASP.NET Core tutorials.

107 posts

Aug 27, 2026 · 5 min

MethodTimer by Fody in .NET

Stopwatch timing clutter adds up fast. MethodTimer.Fody weaves duration logging at compile time with a [Time] attribute, optional custom loggers and parameter values in messages.

Aug 20, 2026 · 6 min

Dapper Transactions in ASP.NET Core

Dapper does not wrap writes in an implicit transaction. Learn BeginTransaction, Dapper.Transaction and TransactionScope so related SQL statements commit or roll back together.

Aug 13, 2026 · 6 min

Integration Tests in ASP.NET Core

Unit tests miss the full request pipeline. Integration tests with WebApplicationFactory, Testcontainers and Respawn verify your ASP.NET Core API against a real PostgreSQL database.

Aug 6, 2026 · 5 min

Generic Repositories in .NET

Generic repositories reuse common CRUD, but pure ones often become an anti-pattern. A hybrid base repository plus specific interfaces keeps reuse without losing entity-focused queries.

Jul 30, 2026 · 6 min

Getting Started with MongoDB in ASP.NET Core

Wire up MongoDB.Driver in ASP.NET Core with options binding, a singleton IMongoClient, BSON document mapping and full CRUD for a Product collection.

Jul 23, 2026 · 6 min

Unit of Work Pattern in .NET

Unit of Work is a transaction boundary for related changes, not a DbContext wrapper. With EF Core you already have it. With Dapper, you coordinate the connection and transaction yourself.

Jul 16, 2026 · 6 min

Problem Details in ASP.NET Core

Inconsistent API errors make clients hard to write. Problem Details give ASP.NET Core a standard shape for HTTP failures, from expected endpoint errors to global exception handling.

Jul 9, 2026 · 6 min

Transactions in EF Core

Database transactions ensure multiple operations succeed or fail together. EF Core wraps SaveChanges in an implicit transaction, with explicit transactions and savepoints for more complex flows.

The next issue lands Thursday.

Join 4,000+ .NET engineers. Free, focused, and easy to leave.