Last week I were presenting LINQ to group of almost 100 audience. While writing query a question raised that what is difference between First and FirstOrDefault . At that time I was not very sure about answer so I asked audience to help me. One from audience answered this question. So credit of this blog to him. For benefit of all I am documenting answer below,
Let us focus on answer of this question. I am sure that you may have come across following query in LINQ.
In below query we are fetching First record on given condition.
Read more: debug mode……