public async Task <IActionResult> Edit(int id, [Bind("ControlSwitchId,ControlSwitch,ManufacturesNameCountry,ManufacturesModelTypeNo")] LookupControlSwitch lookupControlSwitch)
        {
            if (id != lookupControlSwitch.ControlSwitchId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(lookupControlSwitch);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LookupControlSwitchExists(lookupControlSwitch.ControlSwitchId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(lookupControlSwitch));
        }
        public async Task <IActionResult> Create([Bind("ControlSwitchId,ControlSwitch,ManufacturesNameCountry,ManufacturesModelTypeNo")] LookupControlSwitch lookupControlSwitch)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lookupControlSwitch);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(lookupControlSwitch));
        }