Пример #1
0
        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));
        }
Пример #2
0
 public static VehicleDuty toDomain(VehicleDutyDto dto)
 {
     return(new VehicleDuty(dto.Key, dto.Vehicle, dto.Date, dto.Trips, dto.Workblocks));
 }