public ActionResult Creat(Customer_Lang customerItem) { if (ModelState.IsValid) { dbContext.Customers_Lang.Add(customerItem); dbContext.SaveChanges(); return null; } return new HttpStatusCodeResult(400, "lỗi tạo khách hàng ngôn ngữ"); }
public ActionResult Update(Customer_Lang customerItem) { if (ModelState.IsValid) { dbContext.Entry(customerItem).State = EntityState.Modified; dbContext.SaveChanges(); return null; } else { return new HttpStatusCodeResult(400, "lỗi update khách hàng ngôn ngữ"); } }