public async Task <IActionResult> Edit(int id, [Bind("Id,Name")] UserType userType) { if (id != userType.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserTypeExists(userType.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userType)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Description")] Category category) { if (id != category.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(category); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CategoryExists(category.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(category)); }
public void Update(Category category) { _capstoneContext.Update(category); }
public void Update(Store store) { _capstoneContext.Update(store); }
public void Update(Products products) { _capstoneContext.Update(products); }