简体   繁体   中英

Interaction between Controller and Business Layer Logic

I have MVC application in which the controller sends out emails based on trigger actions on the view. This works correctly. The project also has a business layer dll which is use to interact with the SQL server database. This works correctly. It is now come to my attention that a website under construction needs to access the controller dll to send emails. Right now the website only works with the BLL. With the data objects being different between the website an the application, how do utilize the same code so that both projects can send emails? I am using Razor templates to create the emails, if that makes a difference.

Upgrade to at least MVC 4 and start utilizing the Web API capability to offer a web service to the other application in development.

Here is a good starting blog post

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM