I\'m trying to use Linq to return a list of ids given a list of objects where the id is a property. I\'d like to be able to do this without looping through each object and p
When taking Distinct we have to cast into IEnumerable too. If list is model means, need to write code like this
IEnumerable ids = list.Select(x => x).Distinct();