How can I use where condition in include? ProgressItems is ICollection<> object. I want to get whole Goal object with filtered items. How can I resolve it?
return _dbContext.Goals
.Include(p => p.GoalExpectation)
.Include(p => p.ProgressItems.Where(r => r.Value > 100))
.SingleOrDefault(p => p.Id == id);
I get such exception
The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties. Parameter name: path