JabbR/JabbR — pull request #1056 by BrianRosamilia (2014-02-01 06:04:28+00:00)
Title: Refactored LINQ to shorter, faster statement in PersistedRepository.IsUs...

I don't see any reason why this statement can't be refactored as below.

There are no integration tests to support my claim, but there is no explicitly assigning null to room name anywhere in the project--for this application's purpose, these should work the same from what I can see (and the manual testing I did).

An equivalent statement should be .Any(r => r.Key == room.Key && r.Name != null) which is still more concise and doesn't return any data from the DB

Curious as to whether or not this is an EF optimization trick, but there are usually comments in the codebase things like this.