attribute routing in webapi .net core code example
Example: route attribute controller with parameter asp.net core
[Route("/api/v1/{foo}")]
public class MyController : Controller
{
public async Task<IActionResult> MyEndpoint(int foo) { }
}
[Route("/api/v1/{foo}")]
public class MyController : Controller
{
public async Task<IActionResult> MyEndpoint(int foo) { }
}