I am designing an asp.net mvc application which uses a service layer. What if we have a service which depends on another service? For, instance, suppose we have the following model:
class UserService : IUserService
{
//implementation requires IEmailService
}
Sure, the concrete implementation EmailService can be injected into the constructor of UserService, but in my understanding, a service layer should mediate between UI and Domain Model, it's like a facade. I would define another layer in such a way that UserService depend on IUserModule and IEmailModule, in this way we could break the dependency between services, services being dependent on a lower layer (in my case module layer). Is it a correct approach?