[Solved] Checking For null in Lambda Expression


Based on “I am trying to get the null, empty string, and source components out of a List” I assume you mean you want a list with these 3 specific values.

var allItems = itemsList
                 .Where(s => string.IsNullOrEmpty(s[Constants.ProductSource])
                             || s[Constants.ProductSource] == source)
                 .ToList()

2

solved Checking For null in Lambda Expression