Example #1
0
 public async Task <BusDto> Handle(GetBusQuery request, CancellationToken cancellationToken)
 {
     return(_customerDxos.MapCustomerDto(_busRepository.Get(request.Id)));
 }
Example #2
0
        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));
        }