public async Task <TripDto> AddAsync(TripDto dto) { var trip = TripMapper.toDomain(dto); await this._repo.AddAsync(trip); await this._unitOfWork.CommitAsync(); return(TripMapper.toDTO(trip)); }
public static Trip toDomain(TripDto dto) { return(new Trip(dto.Key, dto.Line, dto.Path, dto.PassingTimes)); }