public async Task <IActionResult> PutCustomer(string id, Customer customer) { if (id != customer.Id) { return(BadRequest()); } _context.Entry(customer).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Edit([Bind(Include = "ID,AccountNumber,FirstName,LastName,Balance")] CheckingAccount checkingAccount) { if (ModelState.IsValid) { db.Entry(checkingAccount).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(checkingAccount)); }
public void Update(Operations entityToUpdate) { db.Entry(entityToUpdate).State = EntityState.Modified; }
public void Update(Cards entityToUpdate) { db.Entry(entityToUpdate).State = EntityState.Modified; }