コード例 #1
0
        // GET: /User/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            UserViewModel userviewmodel = UserViewModel.CreateFromUser(db.Users.GetById(id));

            if (userviewmodel == null)
            {
                return(HttpNotFound());
            }
            return(View(userviewmodel));
        }