Apologies,
Struggling a bit to get my head around this.
I need to get the distinct values in the following list based on a property value of 'Answer' and the property value of EmployeeNumber
I retrieved values from a database
EmployeeNumber Answer
1234 a
1234 a
1234 c
9986 a
9986 a
9986 a
9987 b
9987 b
9987 a
the result of my list should be like this
EmployeeNumber Answer
1234 a
1234 c
9986 a
9987 b
9987 a
How can I achieve this?
I started with the following var list1 = usersDevicesused.DistinctBy(x => x.Answer).ToList(); which then only brings back 3 values which is not what I am after.
Kind regards