Hii,
I have two methods like
public IEnumerable<DataAccessModel.Claim> GetAllClaims()
{
return claimDataService.GetClaimRecords();
}
where
Claim table contains
Id and other columns like
category etc..
public IEnumerable<DataAccessModel.GroupClaim> GetClaimsForGroup(Guid groupId)
{
return groupDataService.GetGroupClaimRecords().Where(x => x.GroupId == groupId);
}
GroupClaim table cointains
ClaimId and
GroupId columns where
ClaimId corresponds to
Id from
Claim table Now I have to populate in a list available ClaimIds ie
Ids from
Claim table which must not contain
Id s from
GroupClaim I have tried out the below code but not working.
public IEnumerable<DataAccessModel.Claim> AvailableGroupClaims(Guid groupId)
{
return claimDataService.GetClaimRecords().Where(y => groupDataService.GetGroupClaimRecords().Where(x => x.GroupId == groupId).Any(a => a.ClaimId != y.Id));
}