public async Task <ActionResult <QueryResult <ActivityLogEntry> > > GetLogEntries( [FromQuery] int?startIndex, [FromQuery] int?limit, [FromQuery] DateTime?minDate, [FromQuery] bool?hasUserId) { return(await _activityManager.GetPagedResultAsync(new ActivityLogQuery { StartIndex = startIndex, Limit = limit, MinDate = minDate, HasUserId = hasUserId }).ConfigureAwait(false)); }
/// <summary> Gets report activities. </summary> /// <param name="request"> The request. </param> /// <returns> The report activities. </returns> private async Task <ReportResult> GetReportActivities(IReportsDownload request) { var activityLogQuery = new ActivityLogQuery { StartIndex = request.StartIndex, Limit = request.HasQueryLimit ? request.Limit : null }; var queryResult = await _activityManager.GetPagedResultAsync(activityLogQuery).ConfigureAwait(false); ReportActivitiesBuilder builder = new ReportActivitiesBuilder(_libraryManager, _userManager); var result = builder.GetResult(queryResult, request); result.TotalRecordCount = queryResult.TotalRecordCount; return(result); }