2
Answers

Select distinct record

Ankit  Shukla

Ankit Shukla

7y
200
1
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)