Startup.cs具有一些可用于配置swagger以添加文件上传功能的方法,现在我可以在.NET Framework中的哪个文件中执行相同的功能?
Startup.cs has some methods which can be used to configure swagger to add file upload functionalities , now in which file in .NET Framework can i do the same functionalities?
推荐答案正如您所说的,您想在dot net framework中使用configure Swagger,因此您需要install Swashbuckle只需打开package manager并输入以下commands
As you said you want to configure Swagger in dot net framework so you need to install Swashbuckle just open package manager and type following commands
Install-Package Swashbuckle -Version 5.6.0然后在App_Start文件中找到SwaggerConfig.cs可以在其中进行配置
then look in your App_Start file you will find SwaggerConfig.cs where you can configure it
最低要求,您需要将此行添加到enable Swagger and Swagger UI.
the minimum, you’ll need this line to enable Swagger and Swagger UI.
GlobalConfiguration.Configuration .EnableSwagger(c => c.SingleApiVersion("v1", "A title for your API")) .EnableSwaggerUi();
在此处查看详细说明
更多推荐
.Net框架应用程序中的"startup.cs"(.Net Core)等效项是什么?
发布评论