public async Task <int> GetPermissionByIdAsync(string id) { OrgUserServiceDevReference.OrgUserServiceClient orgUserServiceClient = new OrgUserServiceDevReference.OrgUserServiceClient(); var permissionList = await orgUserServiceClient.GetPermissionListAsync(); return(permissionList.Where(x => x.PermissionID == id).Select(i => i.PermissionKey).Single()); }
public async Task <IEnumerable <OrgUserServiceDevReference.Permission> > GetPermissionListAsync() { OrgUserServiceDevReference.OrgUserServiceClient orgUserServiceClient = new OrgUserServiceDevReference.OrgUserServiceClient(); var permissionList = await orgUserServiceClient.GetPermissionListAsync(); //IEnumerable<OrgUserServiceDevReference.PermissionProfile> permissionProfilesResult = permissionProfiles.Cast<OrgUserServiceDevReference.PermissionProfile>(); return(permissionList.Where(x => x.PermissionKey != 1)); }