当前位置:网站首页>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.
边栏推荐
- Web APIs BOM - operating browser: swiper plug-in
- The browser
- - heavy OpenCV 】 【 mapping
- idea中diagram使用
- 简单的线性表的顺序表示实现,以及线性表的链式表示和实现、带头节点的单向链表,C语言简单实现一些基本功能
- 2022焊工(初级)上岗证题目模拟考试平台操作
- Kubernetes:(十一)KubeSphere的介绍和安装(华丽的篇章)
- 第08章 索引的创建与设计原则【2.索引及调优篇】【MySQL高级】
- esp32 releases robot battery voltage to ros2 (micro-ros+CoCube)
- 实例037:排序
猜你喜欢

工程制图复习题(带答案)

Continuing to pour money into commodities research and development, the ding-dong buy vegetables in win into the supply chain

2022广东省安全员A证第三批(主要负责人)考试题库及模拟考试

脚手架内容详解分析

idea中diagram使用

参加Oracle OCP和MySQL OCP考试的学员怎样在VUE预约考试

持续投入商品研发,叮咚买菜赢在了供应链投入上

出海季,互联网出海锦囊之本地化

【学习笔记之菜Dog学C】动态内存管理

html select标签赋值数据库查询结果
随机推荐
Flutter3.0线程——四步教你如何全方位了解(事件队列)
Example: 036 is a prime number
Oracle迁移到瀚高之后,空值问题处理
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
关联接口测试
activiti流程执行过程中,数据库表的使用关系
Variable string
Sky map coordinate system to Gaode coordinate system WGS84 to GCJ02
第13章 网络安全漏洞防护技术原理与应用
浏览器存储
Snake game bug analysis and function expansion
Day13 Postman的使用
The idea of the diagram
实例040:逆序列表
持续投入商品研发,叮咚买菜赢在了供应链投入上
Dong mingzhu live cold face away, when employees frequency low-level mistakes, no one can understand their products
计算首屏时间
In the season of going overseas, the localization of Internet tips for going overseas
STM32-遥感数据处理
实例036:算素数