// private readonly IMemoryCache memoryCache; public ActivitiesController(IActivitiesService activitiesService, IDestinationsService destinationsService /*, IMemoryCache memoryCache*/) { this.activitiesService = activitiesService; this.destinationsService = destinationsService; // this.memoryCache = memoryCache; }
// private readonly IMemoryCache memoryCache; public RestaurantsController(IRestaurantsService restaurantsService, IDestinationsService destinationsService /*, IMemoryCache memoryCache*/) { this.restaurantsService = restaurantsService; this.destinationsService = destinationsService; // this.memoryCache = memoryCache; }
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; }
public BusesController( IDestinationsService destinationsService, IBusesService busesService) { if (destinationsService is null) { throw new ArgumentNullException(nameof(destinationsService)); } if (busesService is null) { throw new ArgumentNullException(nameof(busesService)); } this.destinationsService = destinationsService; this.busesService = busesService; }
public FlightsController( IDestinationsService destinationsService, IFlightsService flightsService) { // Guard clauses if (destinationsService is null) { throw new ArgumentNullException(nameof(destinationsService)); } if (flightsService is null) { throw new ArgumentNullException(nameof(flightsService)); } this.destinationsService = destinationsService; this.flightsService = flightsService; }
public static IEnumerable <SelectListItem> GetAllDestinations(IDestinationsService destinationsService) { var destinations = destinationsService.GetAllDestinationsAsync().GetAwaiter().GetResult(); var groups = new List <SelectListGroup>(); foreach (var destinationViewModel in destinations) { if (groups.All(g => g.Name != destinationViewModel.CountryName)) { groups.Add(new SelectListGroup { Name = destinationViewModel.CountryName }); } } return(destinations.Select(x => new SelectListItem { Value = x.Id.ToString(), Text = x.Name, Group = groups.FirstOrDefault(g => g.Name == x.CountryName), }).OrderBy(x => x.Group.Name)); }
public FlightsController(IDestinationsService destinationsService, IFlightsService flightsService) { this.destinationsService = destinationsService; this.flightsService = flightsService; }
public DestinationsController(IDestinationsService destinationsService, ICountriesService countriesService) { this.destinationsService = destinationsService; this.countriesService = countriesService; }
public HotelsController(IDestinationsService destinationsService, IHotelsService hotelsService) { this.destinationsService = destinationsService; this.hotelsService = hotelsService; }
// private readonly IMemoryCache memoryCache; public DestinationsController(IDestinationsService destinationsService /*, IMemoryCache memoryCache*/) { this.destinationsService = destinationsService; // this.memoryCache = memoryCache; }
public BusesController(IBusesService busesService, IDestinationsService destinationsService) { this.busesService = busesService; this.destinationsService = destinationsService; }
public OrganizedTripsController(IOrganizedTripsService tripsService, IHotelsService hotelsService, IDestinationsService destinationsService) { this.tripsService = tripsService; this.hotelsService = hotelsService; this.destinationsService = destinationsService; }
public RestaurantsController(IRestaurantsService restaurantsService, IDestinationsService destinationsService) { this.restaurantsService = restaurantsService; this.destinationsService = destinationsService; }
public DestinationsController(IDestinationsService destinationsService) { this.destinationsService = destinationsService; }
public OrganizedTripsController(IDestinationsService destinationsService, IOrganizedTripsService organizedTripsService) { this.destinationsService = destinationsService; this.organizedTripsService = organizedTripsService; }
public ActivitiesController(IActivitiesService activitiesService, IDestinationsService destinationsService) { this.activitiesService = activitiesService; this.destinationsService = destinationsService; }