Beispiel #1
0
 public ActionResult Edit(AirbnbAccount model)
 {
     if (ModelState.IsValid)
     {
         _dbContext.Entry(model).State = EntityState.Modified;
         _dbContext.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
Beispiel #2
0
 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));
 }