Writing
All posts
Practical C#, .NET, and ASP.NET Core tutorials.
107 posts

Connect database to AI with Devart MCP in ASP.NET Core
Devart MCP Server Universal bridges your database to AI, letting assistants turn natural language questions into accurate EF Core code by querying the real schema and data.

MongoDB with EF Core
Use MongoDB with the familiar EF Core model. Install MongoDB.EntityFrameworkCore, call UseMongoDB and keep DbContext, LINQ and SaveChanges while storing documents.

HTTP Client Caching with Replicant in .NET
Repeated HTTP calls to the same endpoint add up fast. Replicant wraps HttpClient with disk-based caching, respects standard cache headers and can cut response times on subsequent requests.

Specification Pattern with EF Core
Query specifications encapsulate Where, Include, OrderBy and paging for EF Core. Not the classic GoF IsSatisfiedBy pattern. Build your own or use Ardalis.Specification.

304 Not Modified with Delta in ASP.NET Core
Repeated GETs for unchanged data waste work. Delta builds ETags from SQL Server change tracking so browsers can get 304 Not Modified without re-running your query.

Respawn for Integration Tests in ASP.NET Core
Shared database state makes integration tests flaky. Respawn resets tables between tests so WebApplicationFactory and Testcontainers stay fast, isolated and reliable.

Smart Enums in ASP.NET Core
C# enums are lightweight but limited. Smart enums give you type-safe instances with FromId, FromName and List, plus clean EF Core mapping and JSON serialization.

Value Objects in .NET
Primitives hide domain meaning. Value objects model concepts like Money and Address with value equality, immutability and rules built in.
The next issue lands Thursday.
Join 4,000+ .NET engineers. Free, focused, and easy to leave.