Building a database management system of multilayer architecture with ASP. MVC5 +sqlserver2014

Source: Internet
Author: User

A database management system for multi-layered architectures with http/ASP /MVC5 +sqlserver2014

Background: Some time ago, to a company to do outsourcing (that is, the icon is Daisy that house). To achieve delivery as soon as possible, look around the web for small to medium business frameworks. It took a few days to find a few, only on GitHub (seemingly the author also charges), the front-end half of the transformation, the back end completely modified (the final version of all without the use of GitHub code). Now, make a contribution to the original version of the outcome of this period of time. If there are similar needs of students, can take to use, not clear can leave a message.

I think: Unless it is customized software and pricing software can be charged, open source should be free of charge, encourage the siege lions continue to blaze new trails, building blocks to promote industry development and social progress.

Requirements: A basic framework, fill content to achieve rapid development, adding and removing changes are used in the same set of code

Get ready:

Development tools: vs2015+sqlserver2008 (lowest)

Required Components:

http/ASP MVC5

StructureMap: Implementing the IOC

Ibatisnet: Accessing the database

Log4net: Log Library

Project structure:

Step-by-step:

1. Create a project with a new solution

2. Configuration

2.1 Package StructureMap

In the core project, initialize the StructureMap component to initialize the configuration file in the red box. Note: Here the path is the relative path to the root directory of the Web site. There are several ways to configure this, which is actually used in the project

Where is the Business.config file? Inside the config of the main program. Note: The properties of these configuration files are changed to always replicate. Otherwise, it will not be generated to the Web site directory.

What is the content of the configuration file? Is the correspondence between the interface and the implementation class

2.2 Package Ibatisnet

In the DAO layer, the Ibatisnet method is encapsulated for external invocation. How are the interfaces and implementation classes in DAO configured? Refer to Section 2.1

2.3 Initializing StructureMap

Here, call the StructureMap initialization method

2.4 How to use

In the appropriate place in the project, the corresponding interface instance is obtained.

2.5 Configuring Ibatisnet

Note This diagram: This is the configuration of the Ibatisnet database-driven

Figure 1: Is the driver of the name=xx; Figure 2 is a database connection, and the following XML file is the place to store the specific SQL

The part of Figure 1 is the corresponding database table, and Figure 2 returns the result, or the parameter needs to use this class; Figure 3 is the specific SQL. The grammar in this is a separate chapter, with time to fill in later

2.6 Configuring the Log component

Re-create a database here, dedicated to the log. Watch the CommandText inside. is the SQL that inserts the log table. The following node is written on the right, mainly control the output of the format and so on, do not explain

This is how it works (this figure may be similar to the original author's main interface, if you violate your interests, please contact me)

So far, this project has been put on GitHub. Called Wisex. is intelligent, easy to use, but now has not reached this level, even if the idea of a wish it. This project is still a continuous commit, hoping to have a common interest of friends to improve it
Wisex Backend System Framework

Some time ago, customers need to start doing crawlers. There are a lot of holes in it. Next, I will take these from the actual combat to summarize the knowledge points, contribute, but also hope and master have more communication

Building a database management system of multilayer architecture with ASP. MVC5 +sqlserver2014

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.