public ActionResult Edit(AirbnbAccount model) { if (ModelState.IsValid) { _dbContext.Entry(model).State = EntityState.Modified; _dbContext.SaveChanges(); return(RedirectToAction("Index")); } return(View(model)); }
public ActionResult Edit(CPL cpl) { if (ModelState.IsValid) { _dbContext.Entry(cpl).State = EntityState.Modified; _dbContext.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Accounts = (new AirbnbAccountProvider(_dbContext)).AggregatedAccounts(); return(View(cpl)); }