Single vs SingleOrDefault in Linq

By | May 23, 2020

Single – Retruns an exception if list contain more than one element or zero element.

SingleOrDefault – Returns an exception if list contains more than one element. if list contains no element then it returns Null.