public async Task <BusDto> Handle(GetBusQuery request, CancellationToken cancellationToken) { return(_customerDxos.MapCustomerDto(_busRepository.Get(request.Id))); }
public async Task <BusDto> Handle(CreateBusCommand request, CancellationToken cancellationToken) { var result = _busRepository.Add(new Domain.Models.Bus(request.License, request.Assembler, request.Model)); return(_customerDxos.MapCustomerDto(result)); }