I am working on a c# asp.net MVC project.it was given to me as a plain old asp.net project which I upgraded to MVC 3. Normally I use vb.net for my projects but this was handed to me as a c# project. In all my projects I create a base repository that uses generics and can handle almost all basic situations, the table it quotes is represented by a member variable of the type IDbSet in the System.Data.Entity namespace. This has always worked fine in my vb projects. In this project I am getting a compile error stating that the type is not recognized and asking if I am missing a using directive or assembly reference.
When I try to define the variable explicitly specifying the namespace like so:
protected readonly System.Data.Entity.IDbSet mObjectSet;
I still get the error, I get intellisence after System. and after Data. but once I type Entity. I get nothing. I have tried cleaning and rebuilding, restarting visual studio, restarting my computer. And there doesn’t seem to be a single related issue on google. Any help is greatly appreciated!
Edit:
I should have mentioned that I have a reference to version 4.0.0.0 of System.Data.Entity already.
IDbSet interface lives in
EntityFramework.dllassembly (not inSystem.Data.Entity.dllassembly, be attentive!). Just add reference to it (Referencesfolder in project tree, then right click and chooseAdd referenceor use NuGet package manager, if you’ve already installed it).