Writing
All posts
Practical C#, .NET, and ASP.NET Core tutorials.
33 posts matching “ASP.NET”

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.

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.

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.

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.

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.

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.
The next issue lands Thursday.
Join 3,000+ .NET engineers. Free, focused, and easy to leave.