3
Answers

Conditional include in linq

mjasri

mjasri

4y
1k
1
I have the below code
 
//var result = (from hold in db.WcmHold
// where hold.Name.Contains(name)
// select hold).Where(x => managments.Contains(x.ManagemntId)).Include("DocumentsImage").Include("FieldsDescription").OrderByDescending(x=>x.CreatDate).Take(100).ToList();
 
I want to show/Include just the "DocumentsImage"  that there Id>=1000
 
Answers (3)