Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id)
        {
            Drone drone = await _drones.GetDroneAsync(id);

            List <Model> models = await _models.GetModelsAsync();

            EditDroneViewModel model = _mapper.Map <EditDroneViewModel>(drone);

            model.SetModels(models);
            return(View(model));
        }