Goodbye, NullReferenceException: Option and LINQ

from blog Just Some Code, | ↗ original
In the previous post of this series, we covered three C# operators to simplify null checks and C# 8.0 Nullable References to signal when things can be null. In this post, let’s learn a more “functional” approach to removing null and how to use it to avoid null when working with LINQ XOrDefault methods. 1. Use Option: A More Functional Approach to...