'how to merge all routing paths in one Route attribute in asp.net core 5

I am working on net core 5 project and I am trying to create an API's wit dynamic URL path's so I started with using Route Attribute like the following

 [Route("customPath")]
[Rout("anotherCustomPath")]
 public IEnumerable<string> Get()
 {
  return new string[] { "value1", "value2"};
 }

my question is how can I mix the two Route attributes in one attribute to be something like

[Route("customPath,anotherCustomPath")] 

and to get custom paths values from a dynamic string ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source