Exemplo n.º 1
0
 public static void Register(HttpConfiguration config)
 {
     using (var context = new NORTHWNDContext())
     {
         config.EnableCors(new EnableCorsAttribute("*", "*", "*", "DataServiceVersion, MaxDataServiceVersion"));
         config.Routes.MapODataRoute(
             routeName: "odata",
             routePrefix: "",
             model: context.GetEdm(),
             batchHandler: new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer)
             );
     }
 }