Reputation: 7299
I have this :
private List<int> linesId = new List<int>();
_materialRepository.ViewLineMaterialStatus()
.Where(i => i.LineId == linesId)
.Tolist();
Can I assign a list in the where
clause ?
Upvotes: 2
Views: 1600
Reputation: 755063
You can't assign it - but you should be able to query it like this:
private List<int> linesId = new List<int>();
_materialRepository.ViewLineMaterialStatus()
.Where(i => linesId.Contains(i.LineId))
.Tolist();
Upvotes: 6