Model First Approach in ASP.NET MVC

0
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.


Tags

Post a Comment

0Comments

POST Answer of Questions and ASK to Doubt

Post a Comment (0)