[gk with gavin w.] - added an orderby criteria to the linq query to ensure the first endpoint matched is the first endpoint added