我正在构建一个ASP.NET Core 2.0 Web应用程序.在ASP.NET WEB中我使用了System.Web.Mvc,其中我有以下行来获取ControllerName:
descriptor.ControllerDescriptor.ControllerName
Run Code Online (Sandbox Code Playgroud)
在ASP.NET Core 2.0中,这不起作用我收到错误:
错误CS1061'ActionDescriptor'不包含'ControllerDescriptor'的定义,也没有扩展方法'ControllerDescriptor'接受'ActionDescriptor'类型的第一个参数
在ASP.NET Core 2.0中,我找不到获取ControllerName的替代方法.有没有人有建议?