Reputation: 1906
I have deleted the valueController and Created a new Controller in my asp.net core web api project which i named : entreprise
In order to serve that controller in launch of the project i tried to change the route in Startup.cs:
app.UseMvc(
routes =>
{
routes.MapRoute(name: "api",
template: "api/{controller=Entreprise}/{action=Get}/{id?}");
}
);
however , that dosen't change anything !? when i launch the project again it open this url : https://localhost:44307/api/values what i want is https://localhost:44307/api/entreprise
Upvotes: 1
Views: 2215
Reputation: 279
edit the Properties\launchSettings.json
file and modify the launchUrl
value accordingly.
Upvotes: 3