Error!
Success!

Implement Null Object pattern with Linq to objects.

0
kicks

Implement Null Object pattern with Linq to objects.  (Unpublished)

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.


Kicked By:
Drop Kicked By: