If you do not need to add the MoreLinq library in your challenge just to get the DistinctBy functionality then you can get the identical end result using the overload of Linq's Unique approach that will take within an IEqualityComparer argument. I came across this problem when refactoring a purpose https://propertyingurugram.in/residential/m3m-114-market/