ASP.NET 5 MVC Core application uses databases whose table columns are slightly different.
Npgsql EF Core provider is used.
How to create DbContext at runtime ? If dependency injection requires DbContext object first time, scaffold should create source code. This code should be compiled into assembly, this assembly shoud loaded into memory, DbContext constructor should called and resulting instance shoudl returned.
How to implement this ? Is there some NuGet package or framework for this ?
Member
53 Points
632 Posts
How to create DbContext at runtime
Jan 26, 2021 11:14 AM|kobruleht|LINK