Monday, 7 November 2016

Insert Update Delete Data First approach using Entity Framework

Let's see with an example:

Tables Used
select * from employeeMaster
select * from employeeLocationDetails
select * from employeeDesignationDetails



Step 1 : Create new MVC Project


Step 2 : Change the Name, Location of Project


Step 3 : Choose Empty MVC Application


Step 4 : Right click on Model and Add new item




Step 5 : Create Model from database


Step 6 : Create new connection 

Step 7 : add the server name

 Step 8 :Add connection string name


 Step 9 : Select the tables you need in your model. select the model namespace


Step 10 : Save the Changes


Step 11 : Right click on controller and add new controller




Step 12 : Run the Application

 Step 13 : Create New Employee


 Step 14 : Update Employee



 Step 15 : Check Employee Details

 Step 16 : Delete the Employee




0 comments:

Post a Comment