Migrations and Seeding on ASP.NET Core

Since most of us using the CodeFirst (Love it!!! – makes our lives easy), its necessary to have the migration executed before it all begins. Since ASP.NET Core is pretty new (at the time I am writing the code), it necessary to have every thing set up correctly from the beginning.

Create a class called DbInitializer.cs, below is the code.

On the Startup.cs, under Configure


Leave a comment