I want to get the current method name of my ASP.NET Core controller
ASP.NET Core
I have tried getting the method name through reflection:
[HttpGet]
In ASP.NET Core it seems to have changed and you have to use the ActionName property
ActionName
((Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor)ViewContext.ActionDescriptor).ActionName;