Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 116.1k

Select distinct record

Oct 12 2017 12:44 AM
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)