public JsonResult DeleteUsers([DataSourceRequest] DataSourceRequest request, AdminExtendedUser user)
        {
            var existingUser = this.Data.Users.All().Where(u => u.Id == user.Id).FirstOrDefault();

            this.Data.Users.Delete(existingUser);
            this.Data.SaveChanges();

            return Json(new[] { user }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult EditUsers([DataSourceRequest] DataSourceRequest request, AdminExtendedUser user)
        {
            var existingUser = this.Data.Users.All().Where(u => u.Id == user.Id).FirstOrDefault();

            if (user != null && ModelState.IsValid)
            {
                existingUser.UserName = user.UserName;
                existingUser.FirstName = user.FirstName;
                existingUser.LastName = user.LastName;
                existingUser.Description = user.Description;
                ViewBag.UserName = user.UserName;

                this.Data.SaveChanges();
            }

            return Json((new[] { user }.ToDataSourceResult(request, ModelState)), JsonRequestBehavior.AllowGet);
        }
        public JsonResult CreateUsers([DataSourceRequest] DataSourceRequest request, AdminExtendedUser user)
        {
            if (user != null && ModelState.IsValid)
            {
                var newUser = new ExtendedUser
                {
                   UserName = user.UserName,
                   FirstName = user.FirstName,
                   LastName = user.LastName,
                   Description = user.Description,
                   PictureUrl = user.PictureUrl.ToString()

                };

                this.Data.Users.Add(newUser);
                this.Data.SaveChanges();

                user.Id = newUser.Id;
            }

            return Json(new[] { user }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
        }