WebApplication1/Startup.cs
/// <summary>
/// Configure the HTTP Request pipeline.
/// </summary>
/// <remarks>This method gets called by the runtime after all services have been added.</remarks>
/// <param name="app">The IApplicationBuilder to configure the application's request pipeline </param>
Configure the HTTP Request pipeline.
Configure the HTTP Request pipeline .
public void Configure(IApplicationBuilder app)
        {
            if (Environment.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            app.UseCors("default");
            app.UseMvc();
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "Todo API");
            });
        }
public void Configure ( IApplicationBuilder app ) { if ( Environment . IsDevelopment ( ) ) { app . UseDeveloperExceptionPage ( ) ; } app . UseCors ( " " ) ; app . UseMvc ( ) ; app . UseSwagger ( ) ; app . UseSwaggerUI ( c => { c . SwaggerEndpoint ( " " , " " ) ; } ) ; }
Configure the HTTP Request pipeline.
Configure the HTTP Request pipeline .
// The server is in development mode, we want to present the error messages towards the developer. Hiding them would be stupid // Use the 'default' CORS policy  // Use the MVC stack - This will enable routing and view rendering // Use the Swagger documentation generator // Use the Swagger UI - This will add the Swagger UI resources to /swagger
app
IApplicationBuilder
The IApplicationBuilder to configure the application's request pipeline
The IApplicationBuilder to configure the application ' s request pipeline
remarks
This method gets called by the runtime after all services have been added.
This method gets called by the runtime after all services have been added .