async Task IStartDataService.AddTour()
        {
            Tour tour = new Tour();

            tour.FoodType = await _foodTypeRepository.Get(1);

            tour.TransportType = await _transportTypeRepository.Get(1);

            tour.TourType = await _tourTypeRepository.Get(1);

            tour.CityFrom = await _cityFromRepository.Get(1);

            tour.Hotel = await _hotelRepository.Get(1);

            tour.CountOfTours = 3;
            tour.DateFrom     = new DateTime(2018, 5, 5);
            tour.DateTo       = new DateTime(2018, 5, 15);
            tour.Price        = 400;
            await _tourRepository.Add(tour);
        }
Beispiel #2
0
        async Task <IEnumerable <CityFromDTO> > IService <CityFromDTO, int> .Get()
        {
            IEnumerable <CityFrom> cities = await _cityFromRepository.Get();

            return(_mapper.Map <IEnumerable <CityFrom>, IEnumerable <CityFromDTO> >(cities));
        }