Construction of ASP.net mvc4+ef5+easyui+unity2.x injection background Management system (4)

Source: Internet
Author: User
Tags exception handling

Build Project Solution Create EF DataBase frist mode

Before this article, we may need to add some basic knowledge.

First of all, our system is based on interface programming, why do we use the pretext of programming, in fact, this is the application of an Enterprise Application architecture Model

Repository (warehousing)

A mechanism for encapsulating the behavior of storage, reading, and lookup, which simulates a collection of objects.

Supports the goal of complete separation and one-way dependency between the domain and the data mapping layer.

Interface programming

The primary goal is to isolate the focus and allow developers to perform their roles.

Code storage confidentiality, subcontracting development, no need to give the logical structure code, just to give the interface file

Disadvantages: Difficult to design, than the traditional three-tier, single class mode is difficult, but interface programmer pay very high!

AOP (aspect-oriented programming)

In order to make up for object-oriented defects, we will introduce aspect-oriented programming

Mainly used for logging, transaction processing, exception handling, and so on.

The concept is too vague and we have to go through a large system to recognize these conceptual models. I can not use the article to analyze the deep concept of this system in detail, need everyone in the day-to-day practice and tacit, recommend a. NET design book,Microsoft. NET Enterprise-class application Architecture Design This book details interface programming, aspect-oriented programming

Through the above we need to build the solution of the project.

Although the controller layer of MVC contains logic, but for a large system, we can not put the business and the bottom of the database together, although provided the models Model folder, in the second I removed him, we will this layer of model to extract, any layer of design is good, Are derived from the three-tier design pattern, and this system is no exception. We are based on the interface programming warehouse mode, so we must have bll,ibll,dal,idal corresponding class library.

OK, now let's right our solution. Established separately

APP.BLL (Business layer)

APP.IBLL (Business layer Interface)

App.dal (Data layer)

App.idal (data-layer interface)

App.models (model)

App.common (Universal class Library)

App.core (Core class library)

Figure:

Add: EF5.0 VS2012 flagship has been installed by default EF5.0 we put him under the App.models class library.

Right-----Add New Item

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.