Beispiel #1
0
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            User user = operatorService.Find(id);

            if (user == null)
            {
                return(HttpNotFound());
            }

            var model = Mapper.Map <OperatorViewModel>(user);

            model.Roles = operatorService.GetRoles(id);

            return(View(model));
        }