asp.net - Should I send e-mails in the service layer or in the controller layer? -


I am using MVC pattern using Service Management (BLL) and repository layers for data management in ASP.NET I am In some cases, when a new request is sent through our website, I would like to send an automated e-mail. In which layer of architecture should this e-mail be sent? In the admin layer or service layer? I was thinking of service level, because that is where "business logic" is going to go, but 100% is not certain that this semantically correct. Edit: When I say "new request" I mean that a user performs an action that saves some type of datastore as an example on the website as a new "project" Make them. Therefore the request will be passed through the Controller> Service> Repository layers.

Agreed they are in the service layer. The administrator must be only very thin; Just leaving the appropriate business / data / calling calling and data in the bizarre view.


Comments