what is the equivalent of “startup.cs”(.Net Core) in my .Net framework application?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 01:59:14

问题


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?


回答1:


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

then look in your App_Start file you will find SwaggerConfig.cs where you can configure it

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();

Look here for long Explanation



来源:https://stackoverflow.com/questions/55037073/what-is-the-equivalent-of-startup-cs-net-core-in-my-net-framework-applicati

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!