Related Items

Tuesday, December 12, 2023

Forget to checkmark use Controllers when creating ASP.NET Core Web API

Sometimes we forget to checkmark the use Controllers when creating ASP.NET Core Web API in the beginning so the screen will show "No operations define in spec !" like the screen below.

What should we do ?

Don't worry, in the program.cs you can add the code :

builder.Services.AddControllers();

app.MapControllers();


 

No comments:

Post a Comment