public async Task <IActionResult> Edit(string id, [Bind("ConductorTypeId,ConductorTypeName")] LookUpConductorType lookUpConductorType) { if (id != lookUpConductorType.ConductorTypeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(lookUpConductorType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LookUpConductorTypeExists(lookUpConductorType.ConductorTypeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(lookUpConductorType)); }
public async Task <IActionResult> Create([Bind("ConductorTypeId,ConductorTypeName")] LookUpConductorType lookUpConductorType) { if (ModelState.IsValid) { _context.Add(lookUpConductorType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(lookUpConductorType)); }