2
Reply

Select distinct record

Ankit  Shukla

Ankit Shukla

Oct 12 2017 12:44 AM
176
Hello,
 
My code is:
 
var ListofRoute = _DatabaseContext.RouteMaster.ToList();
return ListofRoute.ToArray();
 
I need to select distinct record only. I tries :
 
var ListofRoute = _DatabaseContext.RouteMaster.Distinct().ToList();
return ListofRoute.ToArray();
 
But its not working. Please help.
Thanks in advance

Answers (2)