I'm trying to get distinct string values out of an Ax repository, but I'm getting a lot of identical strings out (strings only contains numbers)
var ret = context.XInventTransBackOrder
.Where(i => i.BatchRouteId != "")
.Select(i => i.BatchRouteId)
.Distinct()
.ToList();
Where am I going wrong?
Have you tried
var ret = context.XInventTransBackOrder
.Where(i => i.BatchRouteId != "")
.Select(i => i.BatchRouteId)
.ToList();
ret = ret
.Distinct()
.ToList();