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ữ"); }
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ữ"); } }