Database access layer of asp.net mvc + Ajax + Extjs + nhib.pdf Series

Source: Internet
Author: User

Overview:

Basic requirements. Use the asp.net mvc Framework and ajax extjs to add, delete, modify, and query simple objects. The database access layer uses the nhib.pdf technology.

Specific Project Description: includes the following four projects

(1) SystemConfigMVCDemo. Entity

Model layer,

The BaseObject class is the parent class of all the child entity classes. The Equals () and GetHashCode () methods are rewritten because all users who have used NHibernate know that, the entity classes mapped to all databases of nhib.pdf must override these two methods. In the following example, in addition to the object class and parent class, there are also mapping Files. The attribute of the mapping file must be remembered here. The Build Action must be Embedded Resource.

(2) SystemConfigMVCDemo. DAO

Dao layer, connected to the database through nhib.pdf, used for specific operations in the database.

The HibernateAccess class constructs sessions through the configuration file, and then adds, deletes, modifies, queries, and other operations through session calls. HibernateDAO has HibernateAccess instances and implements methods in the IBussinessDAO interface. SystemConfigDAO inherits the HibernateDAO class. Therefore, you can add, delete, and modify databases directly.

(3) SystemConfigMVCDemo. Service

SystemConfigService class implementation Interface

(4) SystemConfigMVCDemo. Bussiness

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.