It's really very simple: Single
returns a single item and throw an exception if there is either none or more than one item. First
will return the first item or throw when there is no item. FirstOrDefault
will return the first item or return null
(in most cases) when there is no item.
This is the behavior the API is supposed to have. Note however that the underlying implementation could have a different behavior. While Entity Framework obeys this, a O/RM like LLBLGen can also return null
when calling First
which is a very strange thing. This was a very strange (and stubborn) decision by the designer IMO.