当前位置:网站首页>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.
边栏推荐
- 出海季,互联网出海锦囊之本地化
- (cf)Codeforces Round #811 (Div. 3)A--E详细题解
- Promise 解决阻塞式同步,将异步变为同步
- FeatureNotFound( bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested:
- [QNX Hypervisor 2.2用户手册]10.3 vdev gic
- 【原创】启动Win10自带的XPS/OXPS阅读器
- 天地图坐标系转高德坐标系 WGS84转GCJ02
- 脚手架内容详解分析
- Example 040: Reverse List
- 网页三维虚拟展厅为接入元宇宙平台做基础
猜你喜欢
实例038:矩阵对角线之和
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
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
ant-design的Select组件采用自定义后缀图标(suffixIcon属性)时,点击该自定义图标没有反应,不会展示下拉菜单的问题
html select tag assignment database query result
esp32 releases robot battery voltage to ros2 (micro-ros+CoCube)
In the season of going overseas, the localization of Internet tips for going overseas
参加Oracle OCP和MySQL OCP考试的学员怎样在VUE预约考试
什么是SVN(Subversion)?
云开发校园微社区微信小程序源码/二手交易/兼职交友微信小程序开源源码
随机推荐
Hey, I had another fight with HR in the small group!
Example 037: Sorting
2022年T电梯修理考题及答案
ssh服务详解
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
Flink原理流程图简单记录
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
halcon自定义函数基本操作
持续投入商品研发,叮咚买菜赢在了供应链投入上
多线程 之 JUC 学习篇章一 创建多线程的步骤
倒计时2天,“文化数字化战略新型基础设施暨文化艺术链生态建设发布会”启幕在即
5.scrapy中间件&分布式爬虫
pytorch应用于MNIST手写字体识别
Continuing to invest in product research and development, Dingdong Maicai wins in supply chain investment
sudo 权限控制,简易
Download install and create/run project for HBuilderX
持续投入商品研发,叮咚买菜赢在了供应链投入上
Flutter3.0线程——四步教你如何全方位了解(事件队列)
可变字符串
C# 构造函数业务场景测试项目