I am learning asp.net mvc and I am building an application that has to serve multiple clients.
Now in a typical asp.net mvc we usually have a composition root class (bootstrapper) where we do all our dependency injection(Unity in my case)
now suppose we are really talking to a wcf service how do you inject the repository?
I dont see a way to inject myRepository interface in my bootstrapper!Am I missing the obvious?
The only way of doing this is by creating the repository in my business layer.
- asp.net mvc.Controller ---->WcfService --->BusinessLayer---->Repository
Given the above is it possible to inject the repository into the service?
When Unittesting I will we be mocking(moq)the repository injecting into the businessLayer.
any suggestions?
thanks for your time