In my repositories, I find that the WhereIf Linq-to-sql extension from this thread (LINQ to SQL Where Clause Optional Criteria) is very useful -- especially the IEnumerable version.
I would like to do the same thing with the Include() statement, but I'm not very good with writing extensions. I got stuck on the declaration of the extension.
Can anyone help me port the WhereIf extension to IncludeIf?