// 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)); }