Beispiel #1
0
        public async Task <IActionResult> GetEvents(string app, [FromQuery] DomainId?ruleId = null, [FromQuery] int skip = 0, [FromQuery] int take = 20)
        {
            var ruleEvents = await ruleEventsRepository.QueryByAppAsync(AppId, ruleId, skip, take);

            var response = RuleEventsDto.FromRuleEvents(ruleEvents, Resources);

            return(Ok(response));
        }
Beispiel #2
0
        public async Task <IActionResult> GetEvents(string app, [FromQuery] Guid?ruleId = null, [FromQuery] int skip = 0, [FromQuery] int take = 20)
        {
            var taskForItems = ruleEventsRepository.QueryByAppAsync(AppId, ruleId, skip, take);
            var taskForCount = ruleEventsRepository.CountByAppAsync(AppId);

            await Task.WhenAll(taskForItems, taskForCount);

            var response = RuleEventsDto.FromRuleEvents(taskForItems.Result, taskForCount.Result, this, app);

            return(Ok(response));
        }