Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I think i am doing this wrong, so please bear with me. I am working on asp mvc4 project. I want to add a entity framework to the project. So i presume i add it to the data models folder(it is generated from a database in my sql express). Now i want to create a DataAccess Class to read and write to the database using the DatabaseEntities Class, i put this class in the model folder. But in order to use this class i have to be able to reference the model itself. How do i do this, i try putting 'using project.' ? , no Data Model option! So either i am putting the DataAccess Class or the Model in the wrong place or i have totally missed something or done something totally wrong?
Posted

1 solution

The solution is to ad the edmx to the models folder and use a code generator to generate the classes and data context. However now i have a new problem in that when i go to add a controller it does not see my data context?!
 
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