Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 359
Shubham Tiwari Avatar asked Mar 07 '19 06:03

Shubham Tiwari


1 Answers

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

enter image description here

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

like image 105
ArunPratap Avatar answered Oct 19 '22 19:10

ArunPratap