SingleOrDefault will throws an exception if query found more than one record. However FirstOrDefault will not throw an exception even it founds more than one record in a result. It simply don’t care number record found in result and simple give you the first result found.

Difference between SingleOrDefualt and FirstOrDefualt

Leave a Reply

Your email address will not be published. Required fields are marked *