I know this has been done a million times before but I'm still in two minds in which way to go:
- EF - UoW / Repository - Service - Web or
- EF - Service - Web
It seems like the UoW / Repository layer is redundant as you can mock DbContext etc. This would make the implentation simples and having the service closer to EF seems more versatile.
Does anybody have any good advice on this?
One question I have around this though is I'm going to be using Ninject to wire things up. On the web side if I want to inject DbContext into the service it needs reference to EF. This seems wrong.
kernel.Bind<FunkySoftwareContext>().ToSelf().InRequestScope();
Is there a way to counteract this?