javascript - Wireing Breeze (with Angular) to an existing WCF Data Service -


the small

I have an existing WCF data service, in which I wipe to use

Can anyone show an example of the Nobie level to do this with the use of the actual database (Bus Odata service)?


long

I have an existing WCF data service which is already in use by a WPF app.

I am experimenting with web development and want to wax the winds to use that service if it matters, then I am using kangaroo (and through hot towels) I'm installing from. Angular Newsletter Package).

I've been Googling in a fair amount and I'm stuck.

I can see two ways underlined by my search:


First

Make a Air Controller For my web app on the server side

I think this problem is with metadata. With my limited understanding I need to wind up all the meta data of my WCF data service. I know how to get the meta from my WCF data service (URL + $ metadata), but I do not know how to tell the bridge.


Second

In this way the implementation is more ambiguous I found the answer accepted on this question:

Actually The answer does not seem to work here. It is based on some things called entityModel which I think can not be found (I have a unit manager, but there is no unit model.) And the unit of properties of the entity manager displays the model has not been done.


Finally I have the best idea of ​​the second method. In this way I can directly connect to my Odata service and my web app is required for "in-in" server component. But I gladly take anything that does not require an entity framework to connect to my database.

I tried several forms of the second option, but I can not seem to work for it. I also tried the specimens of Breeze. It has one for ODTA, but it still depends on the source framework up from the source database.

To summarize what I am asking for: I is looking for an example of a bridge that connects to an existing WCF data service.

We regret that you were misleading by the old stack overflow to the north The date was exited and (hence) wrong was not a type named entity model .

I updated the answer there and repeated the same advice here.

The method recommended to configure Brief speaks to a standard Odata source (such as WCF odata service)

  breeze.config.initializeAdapterInstance ('dataService' , 'OData', is true);   

Here you can proceed with a defining EntityManager and service query:

  // Full URL specified WCF service address var serviceName = "http: // localhost: 9009 / ODataService.svc"; Var = new wind Entity manager (serviceName); Var query = breeze.EntityQuery.from ("customer"). Where ("company name", "starts", "b"). OrderBy ("city"); Em.executeQuery (query). Then (function (data) {// process data result here.});   

There are some documents on this topic.

A Web API Odata service is different from WCF OData in many cases the service. But you can still get the price.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -