コード例 #1
0
 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ữ");
 }
コード例 #2
0
 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ữ");
     }
 }