Netcore 3.1 mvcとapi構成ルーティング
mvc
services.AddControllersWithViews();
......
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
API
services.AddControllers();
......
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
// , url