I'm writing out an aggregated list of statuses. It works fine except for the situation where there are none. At the moment, null is rendered and the position is empty.
item.Stuff.Where(e => Condition(e))
.Select(f => f.Status)
.Aggregate(String.Empty, (a, b) => a + b)
Now, I'd like to populate the table element with "---" in case the list is filtered down to an empty one by Condition but I can't decide on a method.
What would be a smooth way to approach it?
I've tried something like the atrocity below but it looks, well..., atrociously and it doesn't render right, neither. I get to see the actual source code line (preceded by False or True) instead of the values.
item.Stuff.Where(e => Condition(e)).Count() < 1
? "---"
: item.Stuff.Where(e => Condition(e))
.Select(f => f.Status)
.Aggregate(String.Empty, (a, b) => a + b)