In regular ASP.NET MVC we used IDisplayMode
to implement a display mode provider and then configure it in Global.asax.cs
file.
This was particularly useful because we'd have a view called Index.cshtml
and another one Index.Mobile.cshtml
and the provider would decide which view to resolve.
How can I achieve the same within ASP.NET Core? I've come across IViewLocationExpander
interface which "is the right way to do things" (from this issue) with no further infomation. I also can't find any other resources about this.