public async Task <IActionResult> Edit(int id, [Bind("Id,Description,Item1,Item2,Item3,Item4,Item5,Item6,Item7,Item8,Item9,Item10")] MtrlList mtrlList) { if (id != mtrlList.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(mtrlList); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MtrlListExists(mtrlList.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(ListMtrlLists))); } return(View(mtrlList)); }
public async Task <IActionResult> Create([Bind("Id,Description,Item1,Item2,Item3,Item4,Item5,Item6,Item7,Item8,Item9,Item10")] MtrlList mtrlList) { if (ModelState.IsValid) { _context.Add(mtrlList); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(ListMtrlLists))); } return(View(mtrlList)); }