public virtual ActionResult Create(UserView editUser)
        {
            if (ModelState.IsValid) {

                var newuser = new User();
                TryUpdateModel(newuser);
                Repository.Add(newuser);
                Repository.Save();
                if (Request.IsAjaxRequest())
                {
                    return Content("用户已添加成功");
                }
                return RedirectToAction("Index");
            }
            if (Request.IsAjaxRequest())
            {
                return Content("用户不能添加");
            }
            return View(new UserView());
        }
 public virtual ActionResult Edit(int id,UserView editUser)
 {
     if (ModelState.IsValid)
         {
             var user = Repository.Single<User>(x => x.UserId == id);
             UpdateModel(user);
             Repository.Save();
             if (Request.IsAjaxRequest())
                 return null;
             return RedirectToAction("Index");
         }
         return View(editUser);
 }