コード例 #1
0
        public async Task AddLocation(DomainLocation newLocation, string travelIdentity)
        {
            var location = LocationConverter.ToDbLocation(newLocation);
            var tours    = await TriposoApiClient.GetTourInformation(location.Name);

            var toursDb = tours.Select(t => TourConverter.ToDbTour(t));

            foreach (var t in toursDb)
            {
                await TourRepository.AddTour(t, travelIdentity);
            }
            await LocationRepository.AddLocation(location, travelIdentity);
        }
コード例 #2
0
 public async Task AddTour(Tour newTour, string travelIdentity)
 {
     var dbTour = TourConverter.ToDbTour(newTour);
     await TourRepository.AddTour(dbTour, travelIdentity);
 }