title: Breeze.js WebApi OData and Durandal
body: <p>i am trying to implement WebApi OData with Durandal, Breeze and knockout. But I always getting below error :</p>
  
  <p><em>Unable to initialize OData.  Needed to support remote OData services</em></p>
  
  <p>I created a view model:</p>
  
  <pre><code>var my = {}; //my namespace
  $(function () {
      var serverAddress = "/odata/";
      breeze.config.initializeAdapterInstances({ dataService: "OData" });
      var manager = new breeze.EntityManager(serverAddress);
  
      my.vm = {
          customers: ko.observableArray([]),
          load: function () {
              var query = breeze.EntityQuery.from("Customers");
              manager.executeQuery(query, function (data) {
                  var results = data.results;
                  $.each(data.results, function (i, c) {
                      my.vm.customers.push(c);
                  });
              });
          }
      }
  
      my.vm.load();
      ko.applyBindings(my.vm);
  });
  </code></pre>
  
  <p>In BreezWebApiConfig mentioned:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static void RegisterBreezePreStart() {
    GlobalConfiguration.Configuration.Routes.MapHttpRoute(
      name: "BreezeApi",
      routeTemplate: "api/{controller}/{action}"
    );
  }
  </code></pre>
  
  <p>and registered WebApi :</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static void Register(HttpConfiguration config)
  {
    config.Routes.MapODataRoute("odata", "odata", GetEdmModel());
    config.Routes.MapHttpRoute(
        name: "DefaultApi",
        routeTemplate: "api/{controller}/{id}",
        defaults: new { id = RouteParameter.Optional }
    );
  }
  </code></pre>
  
  <p>Please suggest me if anyone having the idea.</p>