public void Configuration(IAppBuilder app)
        {
            HttpConfiguration config = new HttpConfiguration();
            var cors = new EnableCorsAttribute("*", "*", "*");
            config.EnableCors(cors);
            config.MapHttpAttributeRoutes();

            var settings = new JsonSerializerSettings();
            settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
            settings.NullValueHandling = NullValueHandling.Ignore;
            settings.DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate;
            config.Formatters.JsonFormatter.SerializerSettings = settings;

            var factory = new DefaultOpenPermitAdapterFactory();
            var adapter = factory.GetOpenPermitAdapter();

            config.Services.Add(typeof(IFilterProvider), new DefaultOpenPermitAdapterFilter(adapter));
            config.MessageHandlers.Insert(0, new ServerCompressionHandler(4096, new GZipCompressor(), new DeflateCompressor()));
            app.UseWebApi(config);
        }
        public void Configuration(IAppBuilder app)
        {
            HttpConfiguration config = new HttpConfiguration();
            var cors = new EnableCorsAttribute("*", "*", "*");

            config.EnableCors(cors);
            config.MapHttpAttributeRoutes();

            var settings = new JsonSerializerSettings();

            settings.ContractResolver     = new CamelCasePropertyNamesContractResolver();
            settings.NullValueHandling    = NullValueHandling.Ignore;
            settings.DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate;
            config.Formatters.JsonFormatter.SerializerSettings = settings;

            var factory = new DefaultOpenPermitAdapterFactory();
            var adapter = factory.GetOpenPermitAdapter();

            config.Services.Add(typeof(IFilterProvider), new DefaultOpenPermitAdapterFilter(adapter));
            config.MessageHandlers.Insert(0, new ServerCompressionHandler(4096, new GZipCompressor(), new DeflateCompressor()));
            app.UseWebApi(config);
        }