//列出某權限的功能 public ActionResult FeatureList(int id) { //id = RoleId RoleFeatureViewModel viewModel = new RoleFeatureViewModel() { Roles = roleSrv.GetAll().ToList(), RoleFeatures = featSrv.GetRoleFeat(id).ToList(), Features = featSrv.GetRestFeat(id).ToList(), CurrentRoleId = id }; return(View("EditRoleFeature", viewModel)); }