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

  1. i reference entityframework.sqlserver.dll in console startup project.
  2. i install entity framework in other project.
  3. i create model db in ef project
  4. i move connection string app.config in ef project console project.

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -