How can I express the following linq query without using
ItemSupplierName = u?.SupplierName
I keep getting a CS1525, CS1003 error message when trying to compile it on my build agent at the above line.
- CS1525 Invalid expression term '.'
- CS1003 Syntax error, ':' expected
Code below, it runs perfectly locally but fails on the build agent.
ExpandedItems = from t in items
from u in t.Supplier.DefaultIfEmpty()
select new {
ItemName = t.Name
ItemSupplierName = u?.SupplierName
}