public ActionResult InsertCustomer([DataSourceRequest] DataSourceRequest request, Customer customerToAdd)
        {
            using (var dbContext = new CustomerContext())
            {
                if (ModelState.IsValid)
                {
                    dbContext.Customers.Add(customerToAdd);
                    dbContext.SaveChanges();
                }

                return Json(new[] { customerToAdd }.ToDataSourceResult(request));
            }
        }
        public ActionResult UpdateCustomer([DataSourceRequest] DataSourceRequest request, Customer customer)
        {
            using (var dbContext = new CustomerContext())
            {
                var customerToUpdate = dbContext.Customers.First(cust => cust.CustomerID == customer.CustomerID);

                TryUpdateModel(customerToUpdate);

                dbContext.SaveChanges();

                return Json(ModelState.ToDataSourceResult());
            }
        }
        public ActionResult DeleteCustomer([DataSourceRequest] DataSourceRequest request, Customer customer)
        {
            using (var dbContext = new CustomerContext())
            {
                var customerToDelete = dbContext.Customers.First(cust => cust.CustomerID == customer.CustomerID);

                if (customerToDelete != null)
                {
                    dbContext.Customers.Remove(customerToDelete);
                    dbContext.SaveChanges();
                }

                return Json(new[] { customerToDelete }.ToDataSourceResult(request));
            }
        }