Skip to content

twobitranch.io

Creating abstractions to avoid possible future problems in ASP.NET Core

ASP.NET Core makes dependency injection so easy that creating abstractions can sometimes become automatic. Create an interface.Create an implementation.Register both with the DI container.Inject the interface into the controller or service. For example:builder.Services.AddScoped<IOrderService, OrderService>(); Then:public class OrdersController : ControllerBase {… Read More »Creating abstractions to avoid possible future problems in ASP.NET Core

Bruised by buttons

There are many dangerous professions in the world. Firefighter. Deep-sea diver. Bull rider. Professional cricket umpire. And then there is the front-end web developer. People assume we sit comfortably at a desk, drinking artisanal coffee while gently arranging rectangles on… Read More »Bruised by buttons