I have two IQueryable
instances - objIQuerableA
and objIQueryableB
and I want to obtain only elements that are present in objIQuerableA
and not in objIQuerableB
.
One way is to use a foreach loop but I wonder if there is a better method.
I have two IQueryable
instances - objIQuerableA
and objIQueryableB
and I want to obtain only elements that are present in objIQuerableA
and not in objIQuerableB
.
One way is to use a foreach loop but I wonder if there is a better method.
Simple and straight forward.
var result = objIQuerableA.Except(objIQuerableB);