public HotelController(IHotelsService hotelsService, IUserService userService)
 {
     Guard.WhenArgument(hotelsService, "hotelsService").IsNull().Throw();
     Guard.WhenArgument(userService, "userService").IsNull().Throw();
     this.hotelsService = hotelsService;
     this.userService   = userService;
 }
Пример #2
0
 public DetailsController(
     IHotelsService hotelsService,
     IHotelRoomsService hotelRoomsService)
 {
     this.hotels     = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
 public DetailsController(
     IHotelsService hotelsService,
     IHotelRoomsService hotelRoomsService)
 {
     this.hotels = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
Пример #4
0
 public HomeController(IDestinationsService destinationsService, IUsersService usersService, IReservationsService reservationService, UserManager <ApplicationUser> userManager, IHotelsService hotelsService)
 {
     this.destinationsService = destinationsService;
     this.usersService        = usersService;
     this.reservationService  = reservationService;
     this.userManager         = userManager;
     this.hotelsService       = hotelsService;
 }
Пример #5
0
 public TripsController(IMonumentsService monumentsService,
                        IHotelsService hotelsService,
                        ITripsService tripsService,
                        IMapper mapper)
 {
     this.monumentsService = monumentsService;
     this.hotelsService    = hotelsService;
     this.tripsService     = tripsService;
     this.mapper           = mapper;
 }
 public HotelReviewsService(MbDbContext dbContext,
                            IMapper mapper,
                            IUsersService usersService,
                            IHotelsService hotelsService)
 {
     this.dbContext     = dbContext;
     this.mapper        = mapper;
     this.usersService  = usersService;
     this.hotelsService = hotelsService;
 }
 public ReservationController(
     IReservationService reservationService,
     IUserService userService,
     IHotelsService hotelService
     )
 {
     this.reservationService = reservationService;
     this.hotelService       = hotelService;
     this.userService        = userService;
 }
Пример #8
0
 public RoomsController(
     IRoomsService roomsServices,
     IPeriodsService periodsServices,
     IReservationsService reservationsServices,
     IHotelsService hotelsService,
     UserManager <BookingUser> userManager)
 {
     this.roomsServices        = roomsServices;
     this.periodsServices      = periodsServices;
     this.reservationsServices = reservationsServices;
     this.hotelsService        = hotelsService;
     this.userManager          = userManager;
 }
 public HotelsController(
     IHotelsService hotelsService,
     IHotelReviewsService hotelReviewsService,
     IHotelCommentsService hotelCommentsService,
     IOblastsService oblastsService,
     IMapper mapper)
 {
     this.hotelsService        = hotelsService;
     this.hotelReviewsService  = hotelReviewsService;
     this.hotelCommentsService = hotelCommentsService;
     this.oblastsService       = oblastsService;
     this.mapper = mapper;
 }
Пример #10
0
 public TripsService(
     MbDbContext dbContext,
     IMapper mapper,
     ImagesUploader imagesUploader,
     IUsersService usersService,
     IMonumentsService monumentsService,
     IHotelsService hotelsService)
 {
     this.dbContext        = dbContext;
     this.mapper           = mapper;
     this.imagesUploader   = imagesUploader;
     this.usersService     = usersService;
     this.monumentsService = monumentsService;
     this.hotelsService    = hotelsService;
 }
Пример #11
0
 public HotelsController(
     UserManager <ApplicationUser> userManager,
     IHotelsService hotelsService,
     ICitiesService citiesService,
     IStarsService starsService,
     IRoomsService roomsService,
     SignInManager <ApplicationUser> signInManager)
 {
     this.userManager   = userManager;
     this.hotelsService = hotelsService;
     this.citiesService = citiesService;
     this.starsService  = starsService;
     this.roomsService  = roomsService;
     this.signInManager = signInManager;
 }
        public ReservationService(
            IEfRepository <Reservation> reservationRepo,
            IHotelsService hotelsService,
            IUserService userService,
            //IEfRepository<Reservation> countriesRepo,
            ISaveContext context
            )
        {
            Guard.WhenArgument(reservationRepo, "reservationRepo").IsNull().Throw();
            Guard.WhenArgument(hotelsService, "hotelsService").IsNull().Throw();
            Guard.WhenArgument(userService, "userService").IsNull().Throw();
            //Guard.WhenArgument(countriesRepo, "countriesRepo").IsNull().Throw();
            Guard.WhenArgument(context, "context").IsNull().Throw();

            this.reservationRepo = reservationRepo;
            this.userService     = userService;
            this.hotelsService   = hotelsService;
            this.context         = context;
        }
        public HotelsServiceTests()
        {
            var services = new ServiceCollection();

            services.AddDbContext <MbDbContext>(opt =>
                                                opt.UseInMemoryDatabase(Guid.NewGuid().ToString()));
            services.AddScoped <IHotelsService, HotelsService>();
            services.AddScoped <IOblastsService, OblastsService>();

            Mapper.Reset();
            Mapper.Initialize(config => config.AddProfile(typeof(HotelsProfile)));
            services.AddScoped <IMapper>(service => Mapper.Instance);

            var account = new Account(GlobalConstants.CloudinaryName,
                                      GlobalConstants.CloudinaryKey, GlobalConstants.CloudinarySecret);

            services.AddScoped(x => new Cloudinary(account));
            services.AddScoped <ImagesUploader>();

            this.provider      = services.BuildServiceProvider();
            this.dbContext     = this.provider.GetService <MbDbContext>();
            this.hotelsService = this.provider.GetService <IHotelsService>();
        }
Пример #14
0
 public GuestController(IHotelsService service)
 {
     this.TempServiceHotels = service;
 }
Пример #15
0
 public OrganizedTripsController(IOrganizedTripsService tripsService, IHotelsService hotelsService, IDestinationsService destinationsService)
 {
     this.tripsService        = tripsService;
     this.hotelsService       = hotelsService;
     this.destinationsService = destinationsService;
 }
Пример #16
0
 public VacationBookingCoordinator()
 {
     _carsService    = RestClient.For <ICarsService>("http://localhost:5001");
     _hotelsService  = RestClient.For <IHotelsService>("http://localhost:5003");
     _flightsService = RestClient.For <IFlightsService>("http://localhost:5002");
 }
Пример #17
0
 public AvailableController(IHotelsService hotelsService, IHotelRoomsService hotelRoomsService)
 {
     this.hotels     = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
Пример #18
0
 public HomeController(ISpecialOffersService specialOffersService, IHotelsService hotelsService)
 {
     this.specialOffersService = specialOffersService;
     this.hotelsService        = hotelsService;
 }
Пример #19
0
 public HotelsController(IHotelsService hotelsService)
 {
     this.hotels = hotelsService;
 }
Пример #20
0
 public HotelsController(IHotelsService hotelsServices, IRoomsService roomsService)
 {
     this.hotelsServices = hotelsServices;
     this.roomsService   = roomsService;
 }
Пример #21
0
 public HotelsController(IHotelsService hotelsServices)
 {
     this.hotelsServices = hotelsServices;
 }
 public AvailableController(IHotelsService hotelsService, IHotelRoomsService hotelRoomsService)
 {
     this.hotels = hotelsService;
     this.hotelRooms = hotelRoomsService;
 }
Пример #23
0
 public HotelsController(IDestinationsService destinationsService, IHotelsService hotelsService)
 {
     this.destinationsService = destinationsService;
     this.hotelsService       = hotelsService;
 }
Пример #24
0
 public HotelCommentsService(MbDbContext dbContext, IUsersService usersService, IHotelsService hotelsService)
 {
     this.dbContext     = dbContext;
     this.usersService  = usersService;
     this.hotelsService = hotelsService;
 }
Пример #25
0
 public HotelController(IHotelsService hotelsService, IMapper mapper)
 {
     _hotelsService = hotelsService;
     _mapper        = mapper;
 }
Пример #26
0
 public AllController(IHotelsService hotelsService)
 {
     this.hotels = hotelsService;
 }
Пример #27
0
 public HotelsController(IHotelsService hotelsService)
 {
     this.hotelsService = hotelsService;
 }
 public HotelReviewsController(IHotelReviewsService hotelReviewsService, IHotelsService hotelsService)
 {
     this.hotelReviewsService = hotelReviewsService;
     this.hotelsService       = hotelsService;
 }