I’m using a dictionary and the key will be the property name and value will be the LINQ query below:
Model.Listexample.Select(a => a.property)
How I can check if there are any items in the list without writing if statement? We can use any other LINQ statement where it checks if there are any elements in the list before using Select().
I tried (Model.Listexample.Any()).Select but it didn’t work.
Any()is written? What do you have againstif()statements?