Exemplo n.º 1
0
        public static ReportDto FromReport(Report report)
        {
            var model = new ReportDto();

            model.ReportId = report.ReportId;

            return(model);
        }
Exemplo n.º 2
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Report = ReportDto.FromReport(await _context.Reports.FindAsync(request.ReportId))
 };
Exemplo n.º 3
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Reports = await _context.Reports.Select(x => ReportDto.FromReport(x)).ToListAsync()
 };