separation of concerns - datacontext

Mar 24, 2015 at 1:46 AM
Well, first of all, thank you very much for this nice project, the code is very clean and well documented with the tests.

I am building a WPF app with your framework and I realized that the way you did it, I must include entity framework DLL in the core project (where I register datacontext instances in my IoC container) because it depends on dbcontext. This sounds weird to me and break separation of concerns principle.

What do you think about it and have you already done something to approach this problem?
Thanks,
Mathieu
Coordinator
Mar 24, 2015 at 2:38 AM
As you already mentioned EF assembly is there only to satisfy DI/IoC configuration, there are zero dependencies on the actual EF assembly (if you have ReSharper you can right click and find usages on the assembly in the Northwind.Web) which is really the concern your after. However for the teams where the assembly is to much to bear because of this (some of teams as well), you can just have your DI/IoC configuration run for each project when your app starts up and wire the assemblies it needs in each project, the caveat here is all your DI/IoC will be configured at each project/layer vs. all of them in the Web or in your case WPF project, which a lot of teams prefer.
Marked as answer by lelong37 on 3/23/2015 at 7:38 PM