I am having a bit of a technical challenge here.
I have a list which contains object of type User.
Now I have to perform a certain operation using linq where the data coming from two different table must match with an Unique combination of Username and Id.
Something of this kind( this is not a correct implementation)
I am stuck on this implementation for quite sometime now.
Actually i cannot user aUser.Contains() here as it has to be of a primitive type.
Can someone help me with this?
IList<User> aUser = GetUser(); // this is a cached data
class User
{
string Username;
Guid id;
}
data = (from v in _dataContext.UserValues
join i in _dataContext.UserItems
on v.ItemId equals i.Id
where (aUser.Contains(v.Id) && aUser.Contains(i.UserName))
select v);
thanks