Пример #1
0
        public async Task <NewTravel> AddTravel(NewTravel newTravel, string userMail)
        {
            newTravel.TravelId = userMail + newTravel.TravelDestination.City + newTravel.TravelDestination.Country + newTravel.ArrivalDate;
            var dbTravel = TravelConverter.ToDbTravel(newTravel);
            var response = await TravelRepository.AddTravelToUser(dbTravel, userMail);

            return(TravelConverter.ToDomainTravel(response));
        }