In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what is the method of .net back-end development template". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
target
Since only the backend development template is built, the master needs to meet the basic requirements.
The frame structure is simple.
Database support: Mssql, Mysql
The frame is easy to use.
Support good business expansion
Is a set of basic development templates
Technology selection
Development language: C #
Runtime. Net Framework4.5
IoC:Autofac 、 Autofac.WebApi2
Dto:AutoMapper
Serialization: Newtonsoft.Json
Orm:FreeSql
Api:Aspnet.WebApi
Database: first MSSQL, second Mysql
Caching: implementing stand-alone memory-level caching based on List or Dictionary
Architecture layering
Database access layer
Freesql entity definition, that is, we often talk about database entities.
Provide access to the dbContext context
Complex definition and implementation of sql operation interface, such as multi-table query, stored procedure execution, etc.
Business layer
The business layer divides two projects, BAccurate only defines the business domain entity, value object, system configuration object, system Model object, AppService, etc.; the implementation of BAccurate.Implement domain business
BAccurate.Implement can rely on the BAccurate.Repository.Fresql layer to achieve data persistence of domain entities.
Feesql entity definitions are not placed in the BAccurate layer (business specification project) to prevent confusion between domain entities and database entities
The BAccurate project can be used by all other projects
Service layer
Both AppService.Implement and Webapi are divided into service layer, where webapi is an anaemia project, but AppService is WebApi interface.
The interface and Model definition of AppService are put into BAccurate (Business Specification Project) to facilitate later rewriting and extension of AppService.
UI layer
Front-end development project
Interface specification
Interface is returned as a resetful api-like specification
The returned results are consistent with the rules.
Prefix verbs for interface name: Get: query; Post: submit data (add / modify); Delete: remove data
Interface naming rules: interface name prefix + business name; named after big hump
The interface should be managed uniformly.
Deployment specification
IIS managed deployment
Front-end static resources, hosted to the wwwroot directory
This is the end of the content of "what is the method of .net back-end development template". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.