0
kicks
Implement Null Object pattern with Linq to objects.
Calling FirstOrDefault can return nulls, making necessary the check for nulls before calling a method in the expected object. Let's explore how to implement the Null Object pattern with a new extension method on IEnumerables that make checking for nulls unnecessary.