I am using attribute based routing on my controller/action to define multiple URLs for the same action.
[Route("MyHome")]
[Route ("HomePage")]
[Route("Home")]
[Route("Home/admin")]
public ActionResult Index()
{
return View();
}
E.g. Above route defines different URLs for the Index action, http://mysite/home, http://mysite/myhome, http://mysite/homepage, http://mysite/home/admin.
It works fine if I defines routes at code time, but my requirement is that I want to store in database and then retrieve same from db and bind at application initialization; Does anyone has any idea how to do same? Thanks in advance.