I'm building an ASP.NET Core 2.0 Web Application. In ASP.NET WEB I used System.Web.Mvc where I had the following line to get the ControllerName:
descriptor.ControllerDescriptor.ControllerName
In ASP.NET Core 2.0 this does not work I get the error:
Error CS1061 'ActionDescriptor' does not contain a definition for 'ControllerDescriptor' and no extension method 'ControllerDescriptor' accepting a first argument of type 'ActionDescriptor'
In ASP.NET Core 2.0 I can't find an alternative to get the ControllerName. Does anyone have a suggestion?