0
votes

I has built a self hosting WCF Service. In fact of this there is no svc-file. The Service works well and I can call it from JavaScript with jQuery.

Now I have a look at breeze and want to call my Service with it.

I use breeze.config.initializeAdapterInstance('dataService', 'odata', true); to config Breeze and include q.min.js, datajs-1.1.3.min.js and breeze.min.js.

But what is the servicename for the EntityManager?

1

1 Answers

0
votes

It's your endpoint or base address. Even if you have self hosted wcf service you must have some endpoint where self hosted service will listen.

So you must have something like this

Uri baseAddress = new Uri("http://localhost:8080/hello");
using (ServiceHost host = new ServiceHost(typeof(HelloWorldService), baseAddress))
{
...
}

so your breeze will be

var myServiceName = "http://localhost:8080/hello";
var em = new breeze.entityModel.EntityManager( {serviceName: myServiceName });