First, open your Global.asax file. In there you will find an Application_Start method. It may look something like this (you actual code will vary)
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
The Application_Start method is calling into each of the classes you see in the App_start folder. Originally, we would include all of this code in the Global.asax, but it got pretty full, so a pattern developed to create single purpose classes in App_start and call them.
The line that you need to add could be directly beneath all the other calls like this
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
ModelMetadataProviders.Current = new CustomModelMetadataProvider();
}
If you find that the Application_start method is getting cluttered, you may replicate the pattern by creating a static class in the app_start folder and calling calling a static method to do the actual work.