Posts

comprehensive EF Core + .NET Core coding and architecture practice roadmap

1. EF Core: Core CRUD & Mapping Practice Goal: Master EF Core fundamentals and database mapping. Tasks: Create a .NET Core Web API project. Define DbContext and models with: Data annotations Fluent API mapping Implement basic CRUD for Employee , Project , Invoice . Practice relationship mapping : One-to-one One-to-many Many-to-many Explore shadow properties & computed columns . Use AsNoTracking() for read-only queries to test performance. Mini Coding Exercise: Build Employee-Project management API with CRUD. Test queries with tracking vs no-tracking and measure performance. 2. EF Core: Advanced Features & Performance Goal: Optimize queries and understand advanced EF Core behavior. Tasks: Query Optimization Include() , ThenInclude() for eager loading. Explicit loading vs lazy loading. Projection with Select() for DTOs. Batch Operations ExecuteUpdate , Execute...

MassTransit EF Core Outbox (NO custom polling worker)

Meaning: You don’t write OutboxPublisherWorker MassTransit automatically stores messages in SQL Server Publishes only after transaction commits Automatically retries delivery Clean + production-ready ✅ What You’ll Get in NEXT++ 1) MassTransit Transactional Outbox Your controller does: Save Order Publish Event (inside same transaction) MassTransit stores it in Outbox table Publishes after commit 2) Inbox (Idempotency) MassTransit can also handle duplicate protection. 3) Retries + Error queue Built-in. 1) Install Required Packages dotnet add package MassTransit dotnet add package MassTransit.RabbitMQ dotnet add package MassTransit.EntityFrameworkCore dotnet add package Microsoft.EntityFrameworkCore.SqlServer dotnet add package Microsoft.EntityFrameworkCore.Tools 2) DbContext (Orders + MassTransit Outbox Tables) 📌 AppDbContext.cs using MassTransit; using MassTransit.EntityFrameworkCoreIntegration; using M...