protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     var c = new RestfulMVC();
     c.Init();
     ModelBinders.Binders.DefaultBinder = new RestfulDefaultModelBinder();
     RegisterRoutes(RouteTable.Routes);
 }
Exemple #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            var c = new RestfulMVC();
            c.Init();
            ModelBinders.Binders.DefaultBinder = new RestfulDefaultModelBinder();
            RegisterRoutes(RouteTable.Routes);

            try
            {
                AutoMapperConfiguration.Configure();
                Mapper.AssertConfigurationIsValid();
            }
            catch (Exception)
            {
                //Some mapping is not working
            }
        }