public static ReportDto FromReport(Report report) { var model = new ReportDto(); model.ReportId = report.ReportId; return(model); }
public async Task <Response> Handle(Request request, CancellationToken cancellationToken) => new Response() { Report = ReportDto.FromReport(await _context.Reports.FindAsync(request.ReportId)) };
public async Task <Response> Handle(Request request, CancellationToken cancellationToken) => new Response() { Reports = await _context.Reports.Select(x => ReportDto.FromReport(x)).ToListAsync() };