Implement Null Object pattern with Linq to objects.(blog.dynamicprogrammer.com)
submitted by
hgarcia(1534) 2 years, 8 months ago
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.
|category: Linq
|Views: 56
tags:
LINQ another
Everyones tags:
Your Tags: