예제 #1
0
        public ActionResult Create(BillBoardType billBoardType)
        {
            if (ModelState.IsValid)
            {
                db.BillBoardTypes.Add(billBoardType);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(billBoardType);
        }
예제 #2
0
 public ActionResult Edit(BillBoardType billBoardType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(billBoardType).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(billBoardType);
 }