public ActionResult Creat(Document_Lang documentItem) { if (ModelState.IsValid) { dbContext.Documents_Lang.Add(documentItem); dbContext.SaveChanges(); return null; } return new HttpStatusCodeResult(400, "lỗi tạo gallery ngôn ngữ"); }
public ActionResult Update(Document_Lang documentItem) { if (ModelState.IsValid) { dbContext.Entry(documentItem).State = EntityState.Modified; dbContext.SaveChanges(); return null; } else { return new HttpStatusCodeResult(400, "lỗi update gallery ngôn ngữ"); } }