当前位置:网站首页>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.
边栏推荐
- How to copy baby from Taobao (or Tmall store) through API interface to Pinduoduo interface code docking tutorial
- SAP SD module foreground operation
- 香港服务器有哪些常用的型号
- 计算首屏时间
- 在更一般意义上验算移位距离和假设
- 工程制图复习题(带答案)
- 脚手架内容详解分析
- Promise solves blocking synchronization and turns asynchronous into synchronous
- 持续投入商品研发,叮咚买菜赢在了供应链投入上
- 实例041:类的方法与变量
猜你喜欢

pytorch应用于MNIST手写字体识别
编写 BOLL 心得体会

Ant - the design of the Select component using a custom icon (suffixIcon attribute) suffixes, click on the custom ICONS have no reaction, will not display the drop-down menu

Example 039: Inserting elements into an ordered list

织梦内核电动伸缩门卷闸门门业公司网站模板 带手机版【站长亲测】

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

There are n steps in total, and you can go up to 1 or 2 steps each time. How many ways are there?

esp32发布机器人电池电压到ros2(micro-ros+CoCube)

2022 China Computing Power Conference released the excellent results of "Innovation Pioneer"

工程制图平面投影练习
随机推荐
The idea of the diagram
实例040:逆序列表
关联接口测试
工程制图名词解释-重点知识
0.1 前言
MySQL高级-读写分离-分库分表
Use of lombok annotation @RequiredArgsConstructor
C program compilation and predefined detailed explanation
2022G1工业锅炉司炉考试练习题及模拟考试
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
[QNX Hypervisor 2.2用户手册]10.3 vdev gic
mpf5_定价Bond_yield curve_Spot coupon_duration_有效利率_连续复利_远期_Vasicek短期_CIR模型Derivatives_Tridiagonal_ppf
一个注解替换synchronized关键字:分布式场景下实现方法加锁
企业虚拟偶像产生了实质性的价值效益
this巩固训练,从两道执行题加深理解闭包与箭头函数中的this
融云「音视频架构实践」技术专场【内含完整PPT】
Kubernetes:(九)coredns(浪不动了)
什么是SVN(Subversion)?
深度学习(三)分类 理论部分
【原创】启动Win10自带的XPS/OXPS阅读器