linq unique count property code example Example: linq unique count property data.Select(x => x.Id).Distinct().Count();