Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        async Task <IEnumerable <TourTypeDTO> > IService <TourTypeDTO, int> .Get()
        {
            IEnumerable <TourType> tours = await _tourTypeRepository.Get();

            return(_mapper.Map <IEnumerable <TourType>, IEnumerable <TourTypeDTO> >(tours));
        }