Exemple #1
0
        public async Task <IActionResult> Add()
        {
            List <Model> models = await _models.GetModelsAsync();

            AddDroneViewModel model = new AddDroneViewModel();

            model.SetModels(models);
            return(View(model));
        }
        public async Task <IActionResult> Models(int manufacturerId)
        {
            ListAircraftViewModel model          = new ListAircraftViewModel();
            List <Model>          aircraftModels = await _models.GetModelsAsync(manufacturerId);

            model.SetModels(aircraftModels);
            return(PartialView(model));
        }
Exemple #3
0
        public async Task <IActionResult> List(int manufacturerId)
        {
            List <Model> models = await _models.GetModelsAsync(manufacturerId);

            return(PartialView(models));
        }
Exemple #4
0
 /// <summary>
 /// Return the available models for a specified manufacturer
 /// </summary>
 /// <returns></returns>
 public async Task <List <Model> > GetModelsAsync(int manufacturerId)
 => await _models.GetModelsAsync(manufacturerId);
Exemple #5
0
        public async Task <IActionResult> Index()
        {
            List <Model> models = await _models.GetModelsAsync();

            return(View(models));
        }