public async Task <VehicleDutyDto> AddAsync(VehicleDutyDto dto) { var vehicleDuty = VehicleDutyMapper.toDomain(dto); await this._repo.AddAsync(vehicleDuty); await this._unitOfWork.CommitAsync(); return(VehicleDutyMapper.toDTO(vehicleDuty)); }
public static VehicleDuty toDomain(VehicleDutyDto dto) { return(new VehicleDuty(dto.Key, dto.Vehicle, dto.Date, dto.Trips, dto.Workblocks)); }