✅ [SOLVED] Multiple functions in same controller? ASP.NET Core API

Hello, I would like to have multiple functions in the same api controller with different routes (eg. "api/[controller]/[function], how would I do that?
This is my structure
namespace xyz.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class LoginController : ControllerBase
    {
        [HttpPost(Name = "functionName")]
        public someData functionName()
        {
            // I would want this to have the route "api/Login/functionName", how do I add the "functionName" to it?
        }
    }
}
Was this page helpful?