示例#1
0
 public ActionResult Creat(MenuItem_Lang menuItem)
 {
     if (ModelState.IsValid)
     {
         dbContext.MenuItems_Lang.Add(menuItem);
         dbContext.SaveChanges();
         return null;
     }
     return new HttpStatusCodeResult(400, "lỗi tạo menu ngôn ngữ");
 }
示例#2
0
 public ActionResult Update(MenuItem_Lang menuItem)
 {
     if (ModelState.IsValid)
     {
         dbContext.Entry(menuItem).State = EntityState.Modified;
         dbContext.SaveChanges();
         return null;
     }
     else
     {
         return new HttpStatusCodeResult(400, "lỗi update menu ngôn ngữ");
     }
 }