AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Asp net core scaffold dbcontext8/1/2023 Now I'm trying to scaffold an identity set for my db but using the same context, so I change DbContext to IdentityDbContext as per some different answers I've found, but when scaffolding and generating code, I get this message: Cannot use an existing DbContext with the '-useDefaultUI' option.Īnd in a separate project I see by scaffolding an Identity I get this line added to my startup. In the Add Identity dialog, select the options you want. ![]() From the left pane of the Add New Scaffolded Item dialog, select Identity. DbContext in dependency injection for ASP.NET Core Simple DbContext initialization with new Using a DbContext factory (e.g. NET Framework console application, 38 NuGet packages, 38 Scaffold-DbContext, 40. From Solution Explorer, right-click on the project > Add > New Scaffolded Item. Public AllTheOtherStuffDbContext() : base("name=AllTheOtherStuffDbContext") NET Core, UWP, and Xamarin with C Holger Schwichtenberg. Public class AllTheOtherStuffDbContext : DbContext I've scaffolded a set of objects from a data object which has given me: namespace WebApplication1.Models 2) create a new model and scaffold an API controller with read/write 3) delete bootstrap. ![]() ![]() 2) create a new model and scaffold an API controller with read/writeĤ) change the created DbContext to inherit from IdentityDbContext
0 Comments
Read More
Leave a Reply. |