Is there a faster way to map endpoints? - C#