0

Will configuring my Entity Framework settings in a DBConfiguration class instead of the app.config in my data layer project give me the ability to use the data layer in the business layer without referencing Entity Framework in the business layer?

2
  • If you mean setting up things like the connection string outside of app.config then yes you can do that with no issues. Commented Mar 14, 2017 at 18:04
  • Whatever application uses your class library will still need to have whatever dependencies are needed by its direct dependencies. Commented Mar 14, 2017 at 18:06

1 Answer 1

1

Technically yes, as long as your data layer project does not expose EF specific types directly that you want to access from your business project and if you keep the required EF assemblies available in the overall solution.

But even when using the app.config approach in your business project you do not have to reference EntityFramework in your business project directly. It is sufficient, that your data layer project references it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.