Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Model First Approach in ASP.NET MVC:-




This approach is similar to data first approach but we will design table schema from an application and database from the database server. Model First Approach Provide Better Design Pattern as Compare to Data First Because we can create table columns,table keys from an application.

Step for Model First:-

Create Database From SQL Server or Local Database Server

Step 2nd:-  Create MVC Project and Right Click on Models Folder and Create Empty Entity Data Model

Step3rd:-   Right Click on edmx file and Add Entity(Table) and Scalar Property( Column) according to the requirement


Step4th:-  Right Click on edmx file and click on Generate Database from Model


Step5th:-  Copy SQL Script from Model.edmx.sql and Go into the database right click on choose NEW QUERY and Paste SQL SCRIPT.

Step7:-  Check Database Table has been created.

Step8:-  Now Build Project and Add Controller by Code or By Scaffolding.


Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post