I have a MVC 4 project set up and generated all the model classes using Entity Framework. Then I added a class and named it same as "MyProjectEntities" class and made it partial so I can add personalized methods in that class. I added bunch of methods to query database in this class and it builds fine. When I call these methods though I get UnintentionalCodeFirstException. I'm not sure what did I do wrong?
See Question&Answers more detail:os