I have to select distinct 1000 records using LINQ. But when I see the query generated it takes 1000 records and applies distinct over that result.
IQueryable<TestClass> resultSet = (from w in ......).Distinct().Take(1000);
where my TestClass would be like,
public TestClass
{
public string TestPRop { get; set; }
//..has some 20 properties
}
Any way to solve this to get distinct applied to the resultset and then take 1000 from the distinct result set?