globalFunctions = _rolesAdapter.GetSecurityRightsForRole(SysManagerConstants.GLOBAL_DEFAULTS_ROLE_NUMBER, "SecFunc"). Select(secRight => new FuncViewModel() { Descrip = secRight.SecFunc.Descrip, FuncCode = secRight.SecFunc.FuncCode, Grouping = secRight.SecFunc.Grouping, Progmodule = secRight.SecFunc.Progmodule, SubCat = secRight.SecFunc.SubCat, GrantPerm = secRight.GrantPerm }).OrderBy(x => x.Descrip); //Unassigned editSecRoleViewModel.UnassignedFunctions = editSecRoleViewModel.UnassignedFunctions.Join(globalFunctions, uf => uf.FuncCode, gf => gf.FuncCode, (uf, gf) => new FuncViewModel() { Descrip = uf.Descrip, FuncCode = uf.FuncCode, Grouping = uf.Grouping, Progmodule = uf.Progmodule, SubCat = uf.SubCat, GrantPerm = (byte)(gf.GrantPerm | uf.GrantPerm), DefaultGrantPerm = gf.GrantPerm }).OrderBy(x => x.Descrip);The problem I'm running into right now is that some new functions were not added into the security rights table. So, if there are 216 UnassignedFunctions and 213 global functions, 3 functions will be automatically eliminated by that JOIN.