RegisterViewModel() public static method

Registers a View Model and associated View.
public static RegisterViewModel ( MvcData viewData, Type modelType ) : void
viewData MvcData The data for the View to register or null if only the Model Type is to be registered.
modelType System.Type The model Type used by the View.
return void
 /// <summary>
 /// Registers this View Model Type.
 /// </summary>
 /// <remarks>
 /// Although this View Model Type is part of the DXA Framework, it has to be registered like any other View Model Type.
 /// In order to work with Tridion Docs content, it will be associated with specific MVC data.
 /// A DXA Web Application/Module that wants to work with Tridion Docs content should call this method
 /// unless it defines its own View Model Type for generic Topics.
 /// </remarks>
 public static void Register()
 {
     using (new Tracer())
     {
         ModelTypeRegistry.RegisterViewModel(new MvcData("Ish:Entity:Topic"), typeof(GenericTopic));
     }
 }