NetCore+Dapper WbpApi Architecture Construction (1): Basic Framework

The original intention is to use dapper to build a high-performance architecture, because dapper is very efficient in operating the database

1. VS creates a NetCore WebApi framework, and then the solution adds a NetStandard class library

The whole solution is shown in the picture

2. According to the idea of ​​DDD architecture, the class library completely acts as a warehousing function. Because the service layer originally provides interfaces, the Application layer is no longer constructed here, and WebApi is directly used as the Application layer. Since the bottom layer uses Dapper, the data layer It is directly merged with the storage layer. If you use EntityFramework, you need to build an EntityFramework layer that is independent of the storage layer.

3. It can be seen from the solution that the Entities folder is for storing entity classes, while the Helper folder encapsulates some commonly used operation classes. RedisHelper is just written and not used, and IRepository is the repository interface, Repository It is the implementation class of the repository interface. As for these classes directly under the class library, the next lecture will explain in detail.

Well, the architecture is not much, I can understand it, use it, and complete the specific functions. The level of the landlord is not high. What are the shortcomings of the truthful architecture? I hope you can enlighten me.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325004404&siteId=291194637