コード例 #1
0
        public ActionResult Create(FoodMenuShift foodmenushift)
        {
            if (ModelState.IsValid)
            {
                db.tabFoodMenuShift.Add(foodmenushift);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(foodmenushift);
        }
コード例 #2
0
 public ActionResult Edit(FoodMenuShift foodmenushift)
 {
     if (ModelState.IsValid)
     {
         db.Entry(foodmenushift).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(foodmenushift);
 }