// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            var model = EdmModelBuilder.GetModel();

            app.UseOData(model);
        }
Example #2
0
        public static void Configuration(IAppBuilder builder)
        {
            HttpConfiguration config = new HttpConfiguration();

            config.MapODataServiceRoute(routeName: "OData", routePrefix: "odata", model: EdmModelBuilder.GetModel());
            config.SetDefaultQuerySettings(new DefaultQuerySettings
            {
                EnableCount   = true,
                EnableExpand  = true,
                EnableFilter  = true,
                EnableOrderBy = true,
                EnableSelect  = true
            });
            builder.UseWebApi(config);
        }
Example #3
0
        public static void Configuration(IAppBuilder builder)
        {
            HttpConfiguration config = new HttpConfiguration();

            config.MapODataServiceRoute(routeName: "OData", routePrefix: "odata", model: EdmModelBuilder.GetModel());
            builder.UseWebApi(config);
        }