Optimizing linq queries with .Any() instead of .Count()

If you have any linq code that looks like this:

Replace it with code that looks like this:

Basically you save time since linq doesn’t need to count each and every record in the collection.

Mike GriffithOptimizing linq queries with .Any() instead of .Count()