public async Task <IActionResult> Index()
        {
            FlightSearchByDroneViewModel model = new FlightSearchByDroneViewModel
            {
                PageNumber = 1
            };
            List <Drone> drones = await _drones.GetDronesAsync();

            model.SetDrones(drones);
            return(View(model));
        }
Beispiel #2
0
        public async Task <IActionResult> Add()
        {
            List <Drone> drones = await _drones.GetDronesAsync();

            List <Location> locations = await _locations.GetLocationsAsync();

            List <Operator> operators = await _operators.GetOperatorsAsync();

            AddFlightViewModel model = new AddFlightViewModel();

            model.SetDrones(drones);
            model.SetLocations(locations);
            model.SetOperators(operators);

            return(View(model));
        }
Beispiel #3
0
        public async Task <IActionResult> Index()
        {
            List <Drone> drones = await _drones.GetDronesAsync();

            return(View(drones));
        }