EF core hosting database migration on a separate project.





Project is available on Github.

Create a NEW project and then ensure you have installed all the nuget packages. The next important task that you need to do is to add a reference to your DbContext entities, if you have it separately from the main project




In your Startup.cs please ensure you have the following codes (which links directly to "Alphacert.Acc.Ods.Entities.Migrations".


services.AddDbContextPool(o => o.UseSqlServer(connectionString, x => x.MigrationsAssembly("Alphacert.Acc.Ods.Entities.Migrations")))

           






Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm