示例#1
0
 public RestaurantsController(IFoodTypeRepository foodType, IFoodCategoryRepository foodCategory, IRestaurantRepository restaurant, IRestaurantFoodRepository restaurantFood, IFoodRepository food)
 {
     _foodType       = foodType;
     _foodCategory   = foodCategory;
     _restaurant     = restaurant;
     _restaurantFood = restaurantFood;
     _food           = food;
 }
        public static async Task <FoodType> GetFoodTypeOrFailAsync(this IFoodTypeRepository repository, Guid id)
        {
            var @food = await repository.GetAsync(id);

            if (@food == null)
            {
                throw new Exception($"Food type with id: '{id}' does not exist.");
            }

            return(@food);
        }
示例#3
0
        public StartDataService(IFoodTypeRepository foodTypeRepository, ICityRepository cityRepository,
                                ICountryRepository countryRepository, IHotelRepository hotelRepository,
                                IPlacementTypeRepository placementTypeRepository, ITransportTypeRepository transportTypeRepository,
                                ITourTypeRepository tourTypeRepository, ICityFromRepository cityFromRepository,
                                ITourRepository tourRepository)

        {
            _tourRepository          = tourRepository;
            _foodTypeRepository      = foodTypeRepository;
            _cityRepository          = cityRepository;
            _cityFromRepository      = cityFromRepository;
            _countryRepository       = countryRepository;
            _hotelRepository         = hotelRepository;
            _placementTypeRepository = placementTypeRepository;
            _transportTypeRepository = transportTypeRepository;
            _tourTypeRepository      = tourTypeRepository;
        }
示例#4
0
 public FoodService(IMapper mapper, IFoodRepository foodRepository, IFoodTypeRepository foodTypeRepository)
 {
     _mapper             = mapper;
     _foodRepository     = foodRepository;
     _foodTypeRepository = foodTypeRepository;
 }
 public FoodTypeRepository(IFoodTypeRepository <GlobalFoodType> repository)
 {
     _repository = repository;
 }
示例#6
0
 public FoodTypeService(IFoodTypeRepository foodTypeRepository, IMapper mapper)
 {
     _foodTypeRepository = foodTypeRepository;
     _mapper             = mapper;
 }
示例#7
0
 public FoodTypeController(IFoodTypeRepository <FoodType> repository)
 {
     _repository = repository;
 }
示例#8
0
 public FoodTypeService(IFoodTypeRepository foodTypeRepository)
 {
     _foodTypeRepository = foodTypeRepository;
 }