Пример #1
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);

            var config = GlobalConfiguration.Configuration;

            var container = new ServiceControllerActivator(config);
            IoCRegister.InitServiceLocator(container);

            config.Services.Replace(typeof(IHttpControllerActivator), container);

            config.Formatters.JsonFormatter.SerializerSettings.ContractResolver =
                new DefaultContractResolver(){IgnoreSerializableAttribute = true};
        }
Пример #2
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);

            var config = GlobalConfiguration.Configuration;

            var container = new ServiceControllerActivator(config);

            IoCRegister.InitServiceLocator(container);

            config.Services.Replace(typeof(IHttpControllerActivator), container);

            config.Formatters.JsonFormatter.SerializerSettings.ContractResolver =
                new DefaultContractResolver()
            {
                IgnoreSerializableAttribute = true
            };
        }