// GET aicraft/index/searchReg?
        public async Task <IActionResult> Index(string searchReg)
        {
            var aircraft = new List <Aircraft>();

            if (!String.IsNullOrEmpty(searchReg))
            {
                aircraft = await _aircraftRepository.GetList(searchReg.ToUpper());
            }
            else
            {
                aircraft = await _aircraftRepository.GetListAll();
            }
            return(View(aircraft));
        }
        public async Task <IViewComponentResult> InvokeAsync(string selected)
        {
            var aircraftListViewModel = new AircraftListViewModel()
            {
                Ids      = new List <string>(),
                Selected = new List <bool>()
            };

            foreach (var aircraft in await _aircraftRepository.GetListAll(false))
            {
                aircraftListViewModel.Ids.Add(aircraft.Id);
                aircraftListViewModel.Selected.Add(aircraft.Id == selected);
            }

            return(View(aircraftListViewModel));
        }