Sorry if this has already been answered, but after 2 hours of research I have not yet found a definitive answer to this question. I hope that the task will give results.
I am "somewhat better than a newbie" with MVC and EF, but I understand the general architecture of applications. You see, to further separate problems and future planned changes, I would like to separate my MVC project from the Entity Framework. Here is what I still have:
- Design models (full of well-annotated POCOs, like containers, not business logic)
- DataAccess project (refers to the project of my models and Entity Framework)
- MVC web project (which only refers to my model project)
I already created a repository template (in the DataAccess project) and tested it with a separate UnitTest project. Everything is working.
The problem is that the consumer (UnitTest project in this case) still needs to bind the link to the Entity Framework (the same with the MVC web project). When I remove the EF link from my test project (and instead hardcode the connection string when passing to the DataAccess project), I get this error:
There is no Entity Framework infrastructure provider for the ADO.NET provider with the invariant name "System.Data.SqlClient". Make sure the provider is registered in the "entityFramework" section in the application configuration file.
, Entity Framework (- UnitTest MVC)? , MVC, - ORM.