Articles tagged #Dependency Injection
5 article(s)
-
Implement Repository Pattern with ASP.NET Core Web API
Implement the Repository Pattern with ASP.NET Core Web API on .NET 10 — EF Core 10, DTO mapping with extension methods, async CRUD operations, and the built-in OpenAPI support with Scalar.
@llaxmikant · Jul 13, 2026 -
AutoMapper in ASP.NET Core Web API — and the Modern Alternatives
AutoMapper usage in ASP.NET Core Web API, its 2025 commercial licensing change, and the modern alternatives — hand-written mapping extension methods and the Mapperly source generator.
@llaxmikant · Jun 12, 2026 -
RESTful CRUD Operations with ASP.NET Core Minimal APIs
Build a CRUD API with correct verbs and status codes: 201 with Location, 204 for deletes, RFC 9457 validation problems, and compile-checked typed results — verified with curl.
@llaxmikant · Apr 10, 2026 -
.NET Dependency Injection Object Lifetimes
Transient, scoped, and singleton lifetimes demonstrated with GUIDs — what each means, why DbContext is scoped, and the captive-dependency trap that leaks state across requests.
@llaxmikant · Dec 14, 2025 -
How to Implement Dependency Injection in .NET Core
Learn dependency injection in .NET with the built-in IoC container — register services in Program.cs, inject them through constructors, choose lifetimes, and swap implementations with one line.
@llaxmikant · Sep 1, 2025