Setup Code first approach in .net core MVC application using entity framework
In Previous article " .Net core MVC project structure explained step by step part 2 " we have discussed about .Net core MVC project structure. In this article we will be setting up the code first approach in .net core application. To control and manage the entities we can opt for code first approach to design our database structure. To setup the entity framework in .net core app we need to add following nuget package to our projects. Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore.Relational Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.Tools Microsoft.EntityFrameworkCore.Design I will show you how and where you need to use the above packages to setup the complete structure. I will use the same solution which i have used in previous article to setup the code first approach. Lets start the implementation. Go to solution explorer and right click on solution then click on new project then create the class library project and na...