I have 2 objects, both of which I want to convert to dictionarys. I use toDictionary<>().
The lambda expression for one object to get the key is (i => i.name). For th
as an inline if query I would use a ternary operator, so:
(i.name != null ? set id to i.name : set id to i.inner.name)