I saw a lot of questions about this, but could not find a clean solution:
I have the following lambda expression:
var result = Store.FirstOrDefault(x.Products.Coupon[0] == 100);
I want to check null for a collection of coupons to check if it is not null, and then compare the first coupon with a value of 100. What would be a clean way to check NULL for a coupon in lambda? I do not want to use the extension method to check for a null value. I would like to do an inline check.
source share