Example #1
0
        public async Task DeleteUserReports(string userId)
        {
            var reportFilter = new ReportFilterSpecification(userId, null);
            var userReports  = _reportRepository.List(reportFilter);

            await _reportRepository.DeleteRangeAsync(userReports);
        }
        public Report GetExistingReport(string userId, int caseId)
        {
            var reportFilter = new ReportFilterSpecification(userId, caseId);

            return(_reportRepository.GetSingleBySpec(reportFilter));
        }
Example #3
0
        public async Task <IReadOnlyList <Report> > GetUserReportsOrderedByCase(string userId, bool includeCase = false)
        {
            var reportFilter = new ReportFilterSpecification(userId, null, includeCase: includeCase, orderByCaseNumber: true);

            return(await _reportRepository.ListAsync(reportFilter));
        }