Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public class FeaturesViewLocator : IViewLocationExpander
{
public void PopulateValues(ViewLocationExpanderContext context)
{
context.Values["customviewlocation"] = nameof(FeaturesViewLocator);
}
public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations)
{
var viewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/Shared/{0}.cshtml"
};
return viewLocationFormats;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment