当前位置:网站首页>Development of Taurus. MVC WebAPI introductory tutorial 1: download environment configuration and operation framework (including series directory).
Development of Taurus. MVC WebAPI introductory tutorial 1: download environment configuration and operation framework (including series directory).
2022-08-04 02:11:00 【[Unreal private school]】
优质资源分享
| 学习路线指引(点击解锁) | 知识定位 | 人群定位 |
|---|---|---|
| 🧡 Python实战微信订餐小程序 🧡 | 进阶级 | 本课程是python flask+微信小程序的完美结合,从项目搭建到腾讯云部署上线,打造一个全栈订餐系统. |
| Python量化交易实战 | 入门级 | 手把手带你打造一个易扩展、更安全、效率更高的量化交易系统 |
前言:
Taurus.MVC The microservice version has been released:Taurus.MVC V3.0.3 微服务开源框架发布:让.NET 架构在大并发的演进过程更简单.
In the past, I wrote articles about related function points when the framework was released,No series is formed.
因此,Plan to add some detailed introductory development tutorials,The contents of this series of tutorials are as follows:
1、Taurus.MVC WebAPI 入门开发教程1:Framework download environment configuration and operation.
2、Taurus.MVC WebAPI 入门开发教程2:Add controller outputHello World.
3、Taurus.MVC WebAPI 入门开发教程3:Route types and route maps.
4、Taurus.MVC WebAPI 入门开发教程4:Controller method and parameter definitions、Get and base validation properties【Require】.
5、Taurus.MVC WebAPI 入门开发教程5:Controller security validation properties【HttpGet、HttpPost】【Ack】【Token】【MicroService】.
6、Taurus.MVC WebAPI 入门开发教程6:全局控制器DefaultControllerwith global events.
7、Taurus.MVC WebAPI 入门开发教程7:Business logic base classLogicBase的使用.
8、Taurus.MVC WebAPI 入门开发教程8:WebAPIDocumentation and automated tests.
Two additional series follow:
1、Taurus.MVC 微服务 Introductory development tutorial series.
2、Taurus.MVC Web应用 Introductory development tutorial series.
Let's start with the first tutorial in this series:
Cite source code:下载框架Taurus.MVC
开源地址:https://github.com/cyq1162/Taurus.MVC

Cite source code:1、打开项目工程:
1、Taurus.MVC.sln :.Net Framework 版本,部署在Window平台.(建议:VS2012以上,直接运行时web.configTurn on classic mode registration,Keep it the same as the picture below)

**2、Taurus.MVC_NetCore :**支持.NET Core series andNET5、NET6、NET7…以及未来版本.(建议:VS2017以上,当前最新VS2022)

说明:
Frameworks have references by default:Package中的CYQ.Data.dll,If the project operation reports related errors,重新引用即可.
若有需要,也可以引用CYQ.Data的源码项目:[https:](https://blog.csdn.net/biggbang)[//github.com/cyq1162/cyqdata](https://blog.csdn.net/biggbang)
Cite source code:2、F5运行工程项目
.NET Bottom version selection:
可以根据需要:
1、.NET版本2.0到4.N版本
2、.NET Core2.1 到.NET6、.NET7及未来版本.
The framework is strong,It's about adapting from early to future,Can adapt to Microsoft's unlimited underlying upgrades,The development code at the application level does not require code migration.
运行成功时:

说明:
源码项目,默认包含MVC的界面,还有Demo控制器,对于WebAPI开发而言,都是可以删除的.
The only catalog files to keep are :WebAPIDevelop documentation related interface files:
.NET :/View/Doc/...
.NET Core :/wwwroot/Views/Doc/.....
引用Nuget包方式:1、新建空项目:
1、ASP.NET 系列:

2、ASP.NET Core 系列:

引用Nuget包方式:2、引用Taurus.MVC:
nuget管理中,搜索taurus,Reference the version based on the project version:
.NET :Taurus.MVC
.NET Core :Taurus.MVC.Core

引用Nuget包方式:3、Configure interception entry
1、普通.Net Framework 项目,It is automatically generated when the package is referencedWeb.Config配置入口:
"Taurus.Core" type="Taurus.Core.UrlRewrite,Taurus.Core"/>
"false" />
"Taurus.Core" type="Taurus.Core.UrlRewrite,Taurus.Core"/>
2、.NET Core 项目,通过Startup.cs 配置入口:
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddHttpContext();
services.Configure(x => x.AllowSynchronousIO = true).Configure(x => x.AllowSynchronousIO = true);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHttpContext();
app.UseTaurusMvc(env);
}
}
3、NET5、NET6、NET7…系列,通过Program.cs 配置入口:
var builder = WebApplication.CreateBuilder(args);
//补上Starpup的ConfigureServices:
builder.Services.Configure(x => x.AllowSynchronousIO = true).Configure(x => x.AllowSynchronousIO = true);builder.Services.AddHttpContext();
*var app = builder.Build();
//补上Starpup的Configure:
app.UseHttpContext();
app.UseTaurusMvc(app.Environment);
app.Run();*
NugetPackage reference method:4:F5运行工程项目
运行成功:(The prompt requires the controller to be coded,The next article adds a controller)

总结:
This article introduces two suggestionsTaurus.MVC WebAPI项目,And the initial run was successful.
The next article introduces the simple coding usage of the controller.
边栏推荐
- Dong mingzhu live cold face away, when employees frequency low-level mistakes, no one can understand their products
- C语言:学生管理系统(链表版)
- Promise 解决阻塞式同步,将异步变为同步
- Promise solves blocking synchronization and turns asynchronous into synchronous
- SAP SD module foreground operation
- Use of lombok annotation @RequiredArgsConstructor
- 在Activity中获取另一个XML文件的控件
- DDTL:远距离的域迁移学习
- splice随机添加和删除的写法
- QNX Hypervisor 2.2用户手册]10.1 通用vdev选项
猜你喜欢

在更一般意义上验算移位距离和假设

【云原生】DevOps(六):Jenkins流水线

瑞能微计量芯片RN2026的实用程序

MallBook联合人民交通出版社,推动驾培领域新发展,开启驾培智慧交易新生态

Zabbix设置邮件告警+企业微信告警

DDTL:远距离的域迁移学习

Web APIs BOM - operating browser: swiper plug-in

priority_queue元素为指针时,重载运算符失效

Priority_queue element as a pointer, the overloaded operators

DDTL: Domain Transfer Learning at a Distance
随机推荐
ant-design的Select组件采用自定义后缀图标(suffixIcon属性)时,点击该自定义图标没有反应,不会展示下拉菜单的问题
html select tag assignment database query result
一个注解替换synchronized关键字:分布式场景下实现方法加锁
各位大佬好,麻烦问一下flink cdc oracle写入doris的时候,发现cpu异常,一下下跑
ssh服务详解
Dong mingzhu live cold face away, when employees frequency low-level mistakes, no one can understand their products
Zabbix set up email alert + enterprise WeChat alert
Day13 Postman的使用
工程制图复习题
STM32-遥感数据处理
QNX Hypervisor 2.2 user manual] 10.1 gm vdev options
香港服务器有哪些常用的型号
瑞能微计量芯片RN2026的实用程序
【学习笔记之菜Dog学C】动态内存管理
Use of lombok annotation @RequiredArgsConstructor
参加Oracle OCP和MySQL OCP考试的学员怎样在VUE预约考试
splice随机添加和删除的写法
Flask Framework Beginner-06-Add, Delete, Modify and Check the Database
持续投入商品研发,叮咚买菜赢在了供应链投入上
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment