Spring.net+nhibenate+asp.net MVC +EXTJS Series 4----business Logic Layer

Source: Internet
Author: User

Last time we completed the interface and implementation of the data access layer, this time we step by step to complete the business layer interface and implementation, and the use of Spring.net declarative transactions. In addition, the NUnit is used to unit test the business implementation.

Like the PetShop framework, we first define the business layer interface, which only has a coupling with the entity. Let's take user users for example:

Iusermanager
Using Directcenter.model;
Namespace DIRECTCENTER.IBLL
{
<summary>
User Management
</summary>
public interface Iusermanager
{
<summary>
Create a user (return contains default values)
</summary>
<returns></returns>
User NewUser ();
<summary>
Save user
</summary>
<param name= "user" > Entity </param>
<returns></returns>
User saveuser (user user);
<summary>
Get user
</summary>
<param name= "userId" > User id</param>
<returns></returns>
User GetUser (string userId);
<summary>
Delete User
</summary>
<param name= "userId" > User id</param>
<returns></returns>
void DeleteUser (string userId);
<summary>
Updating users
</summary>
<param name= "user" > Entity </param>
<returns></returns>
User UpdateUser (user user);
}
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.