I am developing an asp.net mvc application that uses a service level. What if we have a service that depends on another service? Suppose, for example, that we have the following model:
class UserService : IUserService
{
}
Of course, a specific implementation of EmailService can be introduced into the UserService constructor, but, in my opinion, the service level should mediate between the user interface and the domain model, it’s like a facade. I would define a different level so that the UserService depended on the IUserModule and IEmailModule, so we could break the dependency between the services dependent on the lower level (in my modular layer). Is this the right approach?
source
share