public async Task <ActionResult> Edit([Bind(Include = "Id,Email,UserName,SecondName,DateOfBirth")] Customer customer) { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index", "Home")); } return(View(customer)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Descripion,Population")] Region region) { if (ModelState.IsValid) { db.Entry(region).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index", "Regions")); } return(View(region)); }