Click here to Skip to main content
15,918,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to store and retrieve data to sql server from mvc through entity framework.
and detail about entity framework.
Posted

1 solution

In mvc you can use two methods for data communication by entity framwork
1. Code first method : In code first you need to create class from the scratch level, In code first approach we avoid working with visual designer of entity framework. In other words the .EDMX file is excluded from the solution. So you now have complete control over the context class as well as the entity classes.

2. Database First method : If you have database already created and you want to user the same in your application then you can use database first method by adding .Edmx file.
Note : If you have less knowledge of OOP and C# coding the you should use database firs method.

Following links are the examples of code first and database firs method and you can search on the google as your requirement.

Links for Code first

http://www.asp.net/mvc/tutorials/mvc-4[^]


http://code.msdn.microsoft.com/ASPNET-MVC-Application-b01a9fe8[^]


How to use Entity Framework Code First for MVC 3[^]

Links for Database first

http://www.asp.net/mvc/tutorials/mvc-5/database-first-development/setting-up-database[^]


http://msdn.microsoft.com/en-in/data/gg685489.aspx[^]


Database First Development with ASP.NET MVC Scaffolding and Entity Framework[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900