public async Task <Report[]> GetReports(string userId = null) { var reports = userId is null ? await _storage.GetReports() .ToArrayAsync() : await _storage.GetReports() .Where(r => r.UserId == userId) .ToArrayAsync(); if (reports.Length is 0) { throw new ReportsNotFoundException(); } return(reports.Select(r => _reportReconstructionFactory.Create(r)).ToArray()); }
task.Reports.Select(r => _reportReconstructionFactory.Create(r)) .ToArray(),