subsonic / SubSonic-3.0-Templates

T4 Template Project for the peeps
http://subsonic.github.io/
105 stars 46 forks source link

Alter ActiveRecord.tt to use Any() instead of Count() > 0 #61

Open jarrettmeyer opened 12 years ago

jarrettmeyer commented 12 years ago

.Count() > 0 will enumerate the entire collection to determine count, then test that count > 0. .Any() will return true as soon as the first record is found.