c# - How to avoid references to Entity framework in multiple projects -
i want encapsulate entity framework in 1 project. project db access alone. when updating, want map domain model ef. purpose other layers of solution should have no knowledge of infrastructure.
my problem need reference ef in "caller" project make work.
is there way avoid this?
solution - consoleproject - entityframeworkproject (ef nuget)
i used approach: https://stackoverflow.com/a/22970805/3874212
- i reference entityframework.sqlserver.dll in console startup project.
- i install entity framework in other project.
- i create model db in ef project
- i move connection string app.config in ef project console project.
Comments
Post a Comment