public ActionResult Create(HouseInfo houseinfo) { if (ModelState.IsValid) { db.HouseInfotbl.Add(houseinfo); db.SaveChanges(); return RedirectToAction("Index"); } return View(houseinfo); }
public ActionResult Edit(HouseInfo houseinfo) { if (ModelState.IsValid) { db.Entry(houseinfo).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(houseinfo); }