예제 #1
0
 public ActionResult Edit([Bind(Include = "AptId,AptAddress,SqFootage,MonthUtilityFee,MonthParkfee,LastCleanDate,IsVacant")] Apartment apartment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(apartment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(apartment));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "TenantId,FirstName,LastName,Phone,Email")] Tenant tenant)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tenant).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tenant));
 }