Implement Null Object pattern with Linq to objects.(blog.dynamicprogrammer.com)
submitted by
hgarcia(1534) 3 years 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: 57
tags:
LINQ another
Everyones tags:
Your Tags: