public IActionResult CreatePost(AzCustomers model)
        {
            if (ModelState.IsValid)
            {
                repository.Insert().With(s => s.CustomerID, model.CustomerID)
                .With(s => s.CompanyName, model.CompanyName)
                .With(s => s.ContactName, model.ContactName)
                .With(s => s.ContactTitle, model.ContactTitle)
                .With(s => s.Address, model.Address)
                .With(s => s.City, model.City)
                .With(s => s.Region, model.Region)
                .With(s => s.PostalCode, model.PostalCode)
                .With(s => s.Country, model.Country)
                .With(s => s.Phone, model.Phone)
                .With(s => s.Fax, model.Fax)

                .Go(); //按增加保存
                return(RedirectToAction("Index"));
            }

            return(View(model));
        }
        /// <summary>
        /// 增加客户
        /// </summary>

        public ActionResult Create()
        {
            var model = new AzCustomers();

            return(View(model));
        }
 public IActionResult DeleteConfirmed(AzCustomers model)
 {
     repository.Delete().Where(c => c.CustomerID == model.CustomerID).Go();
     return(RedirectToAction("Index"));
 }