public ActionResult Edit(int id) { var model = new CreateEditViewModel(); var role = roleProvider.GetRole(id); Mapper.DynamicMap(role, model); return(View(model)); }