Exemplo n.º 1
0
        public async Task <DriverDutyDto> AddAsync(DriverDutyDto dto)
        {
            var driverDuty = DriverDutyMapper.toDomain(dto);

            await this._repo.AddAsync(driverDuty);

            await this._unitOfWork.CommitAsync();

            return(DriverDutyMapper.toDTO(driverDuty));
        }
Exemplo n.º 2
0
 public static DriverDuty toDomain(DriverDutyDto dto)
 {
     return(new DriverDuty(dto.Key, dto.Driver, dto.Workblocks));
 }