コード例 #1
0
        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));
        }
コード例 #2
0
 public static Trip toDomain(TripDto dto)
 {
     return(new Trip(dto.Key, dto.Line, dto.Path, dto.PassingTimes));
 }