示例#1
0
        public ActionResult Create(WebInfo webinfo)
        {
            if (ModelState.IsValid)
            {
                db.WebInfoes.Add(webinfo);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(webinfo);
        }
示例#2
0
 public ActionResult Edit(WebInfo webinfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(webinfo).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(webinfo);
 }