Example #1
0
        public ActionResult Create(HouseInfo houseinfo)
        {
            if (ModelState.IsValid)
            {
                db.HouseInfotbl.Add(houseinfo);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(houseinfo);
        }
Example #2
0
 public ActionResult Edit(HouseInfo houseinfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(houseinfo).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(houseinfo);
 }