1

嗨我有BaseController : ApiController

TestController : BaseController

如何获取控制器名称和TestController的相关详细信息

使用下面的代码

GlobalConfiguration.Configuration.Services.GetApiExplorer().ApiDescriptions
    .GroupBy(x => x.ActionDescriptor.ControllerDescriptor.ControllerName)
    .Select(x => x.First().ActionDescriptor.ControllerDescriptor.ControllerName)

我可以获得详细信息(ApiDescriptionsBaseController

如何获取TestController的详细信息( ApiDescriptions)?

4

1 回答 1

0

My Mistake

Now I comment bellow code from TestController. And now Everything work perfectly

[ApiExplorerSettings(IgnoreApi = true)]
于 2013-04-17T12:41:01.410 回答