I'm using Asp.Net Core 3.1 with Entity Framework, Asp.Net Identity, and IdentityServer4. I'm trying to share my DbContexts across several projects but my code first migrations aren't producing what I need. Is this possible with code first migrations? Is my setup completely asinine? Thank you for your time.
services.AddIdentity<AppUser, IdentityRole>()
.AddEntityFrameworkStores<AppUserContext>()
.AddDefaultTokenProviders();
...
services.AddDbContext<AppUserContext>(options => options.UseSqlServer(connectionString));
dotnet-ef migrations add Init -p User\User.csproj -c AppUserContext -s IdentityServer\IdentityServer.csproj
dotnet-ef migrations add Init -p Persistence\Persistence.csproj -c RecipeContext -s Application\Application.csproj
Moving AppUser and AppUserContext to IdentityServer. Red is a restricted endpoint.
Thanks to @RuardvanElburg's advice, I "solved" this by changing my paradigm which you can see in my Update 1.