예제 #1
0
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            var formatter = new EmvelopeMediaTypeFormatter();
            formatter.AddMetaProvider(new PagingMetaProvider());

            config.Formatters.Insert(0, formatter);

            config.Routes.MapHttpRoute(
                "DefaultApi",
                "api/{controller}/{id}",
                new
                {
                    id = RouteParameter.Optional
                });

            app.UseWebApi(config);
        }
예제 #2
0
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            var formatter = new EmvelopeMediaTypeFormatter();

            formatter.AddMetaProvider(new PagingMetaProvider());

            config.Formatters.Insert(0, formatter);

            config.Routes.MapHttpRoute(
                "DefaultApi",
                "api/{controller}/{id}",
                new
            {
                id = RouteParameter.Optional
            });

            app.UseWebApi(config);
        }