Installation
Install AlmightyShogun.EntityFrameworkCore.Utils in the project that contains the DbContext or entity model configuration. The package targets net10.0 and adds extension methods for Entity Framework Core's ModelBuilder.
sh
dotnet add package AlmightyShogun.EntityFrameworkCore.UtilsDependencies
Microsoft.EntityFrameworkCore10.0.8— providesModelBuilder, relationship builders, delete behavior options, and navigation configuration APIs used by the package.
Startup Registration
This package does not register services. Call the extension methods from DbContext.OnModelCreating or from model configuration code that receives a ModelBuilder.
csharp
using Microsoft.EntityFrameworkCore;
using AlmightyShogun.EntityFrameworkCore.Utils;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyAutoInclude<User>(user => user.Profile);
}