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)); }
public static DriverDuty toDomain(DriverDutyDto dto) { return(new DriverDuty(dto.Key, dto.Driver, dto.Workblocks)); }