0

Using ASP.NET Core and I need to resolve controller and action from URL depends on the settings in Dictionary (or DB). URL => Controller, Action

/something/and/more/2016-10-16 must be processed by controller "Content" and Action "Details"

/something/special must be processed by controller "Blog" and Action "Index"

/super-offer.html must be processed by "Content"/"Offers"

URLs and related Controller with Action stored in Dictionary, for example.

I need a help with building this handler. Thanks!

Alex
  • 311
  • 2
  • 14
  • 2
    show what you have done so far. If you are not familiar with routing, start from documentation https://docs.asp.net/en/latest/fundamentals/routing.html?highlight=routing – Set Oct 16 '16 at 13:59
  • Resolved question by implementation like this: http://stackoverflow.com/questions/36724177/nothing-happened-with-custom-irouter-in-asp-net-core – Alex Oct 17 '16 at 14:47

1 Answers1

0

Solution is an implementation of IRouter and replace RouteContext context in RouteAsync method.

Alex
  • 311
  • 2
  • 14