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