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

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.

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.

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.

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.

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.

Data Encryption with EF Core
By combining EF Core with value converters, you can transparently encrypt data before it is stored in the database and decrypt it when it is retrieved.

Entity Developer and dotConnect for ASP.NET Core
EF Core and other first party tools are amazing in modern data access development in .NET ecosystem.
The next issue lands Thursday.
Join 3,000+ .NET engineers. Free, focused, and easy to leave.