Custom Razor Viewer in MVC 6
I am doing some prototypes in .NET 5 MVC 6 and am trying to figure out where to register my own razor view engine. MVC 6 no longer has a global.asax file for registering custom objects. It has a startup.cs file which I would guess is the place to add it, but I'm not sure if this is the right place to do this and which method to call.
I current has its own razor viewer which looks something like
public class MyCustomerViewEngine : RazorViewEngine
{
public MyCustomerViewEngine()
{
//My custom view stuff
}
}
Any help would be greatly appreciated.
+3
source to share