Thursday, July 2, 2015

how to work with Entity Framework project


Steps to create entity frmawork project
1.Create a class library project for Context name YourProjectNameContext.
2.Right click the project and add new edmx.
3.Before creating edmx ensure that your Database is ready with proper relationship.
4.Open edmx file -> right click -> Add code generation Item -> select ADO.Net Self-tracking Entity Generator.
5.Add new Class library project for Entity named yourProjectNameEntities
6.Drag the .tt from Context project and drop it to Entity project.
7.Delete .tt files from Context project.
7.Reference - install entity framework,add refernce system.runtime.services.
8.Create your website/webapi project and add above created projects to here.


Regards
Santosh Singh
Rain Water Harvesting System Click here for info

Best Android Phones Below Rs- 5000