0

First of all, please forgive me if this question is too basic or otherwise laughable. The question is, why doesn't this work in a Razor view:

@item.Clients.Where(u => u.IsActive).FirstOrDefault().Name.Any() ?? "(None Exist)"

If this Client Name field exists, then I want it to be displayed in this View, and if it doesn't exist, I need the "(None Exist)" string to be displayed.

user7050575
  • 51
  • 1
  • 8

0 Answers0