Auto Registering dependencies with Scrutor

Dependency injection (DI) software design pattern is one of the most used ones and requires no introduction, but if you need any check out MDNS article about this topic. To achieve Inversion of Control we can use DI Containers, in which we define services and the abstractions that they fulfill so that they can be injected (created) at runtime. .NET Core and .NET5+ has a simple container built-in that allows registering dependencies one by one, but the application can quickly outgrow this approach, plus it creates an additional responsibility of remembering to register our new service each time we create one....

EF Core Registering Model Configurations By Convention

When our model configuration is stored all in one file it becomes tedious to edit it as the application grows. Even, if developers agree to stick to some kind of ordering it is bound to blur and fade away as one of the developers inevitably adds one configuration in the wrong place. How can we prevent it? The answer to our problem is: IEntityTypeConfiguration<T>. By implementing the interface you can configure the model for each class by implementing the interface’s only method void Configure(EntityTypeBuilder<T> builder)....