namespace MiaoYu.Api.Admin.Controllers.DevelopmentTools; /// /// EFCore 监控 控制器 /// [ControllerDescriptor(MenuId = "33")] public class MonitorEFCoreController : AdminControllerBase { public MonitorEFCoreController(IMonitorEFCoreService defaultService) : base(defaultService) { } /// /// 获取 EFCore 监控上下文 /// /// [ActionDescriptor(DisplayName = "获取 EFCore 监控上下文")] [HttpPost] public EntityFrameworkRepositoriesMonitorContext GetEFCoreMonitorContext() { return _defaultService.GetEFCoreMonitorContext(); } /// /// 获取 EFCore Sql 监控上下文 耗时排行榜 /// /// [ActionDescriptor(DisplayName = "获取 EFCore Sql 监控上下文 耗时排行榜")] [HttpPost] public List GetTimeConsumingRanking() { return _defaultService.GetTimeConsumingRanking(); } /// /// 获取 EFCore Sql 监控上下文 最新数据 /// /// [ActionDescriptor(DisplayName = "获取 EFCore Sql 监控上下文 最新数据")] [HttpPost] public List GetNewest() { return _defaultService.GetNewest(); } }