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