I have a Agent entity having 3 columns AgentGuid (PK), AgentId (not unique) and AgentName. I have a csv file have 2 columns (AgentId, AgentName) which are comma separated to be passed as filter condition.
1001,Agent1
1002,Agent2
1003,Agent3
1001,Agent4
I wrote the LINQ query like below :
var AgentIds = new List<Guid?>();
var filter = File.ReadLines(strFilePath).Select(line => line.Split(','));
AgentIds = (from a in linq.AgentSet
where filter.Any(f => f[0] == a.AgnetID && f[1] == a.AgentName.ToString())
select a.AgentGuid).ToList();
I thought I am done... but query is giving me exception,
Exceptions: System.NotSupportedException, "Invalid 'where' condition. An entity member is invoking an invalid property or method."
may be I am missing something please suggest.
*This post is locked for comments
I have the same question (0)