New Posts New Posts RSS Feed: Use EntitityService of Silverlight-App from local WPF App
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Use EntitityService of Silverlight-App from local WPF App

 Post Reply Post Reply
Author
Andrew View Drop Down
Newbie
Newbie
Avatar

Joined: 18-Feb-2010
Location: Germany
Posts: 17
Post Options Post Options   Quote Andrew Quote  Post ReplyReply Direct Link To This Post Topic: Use EntitityService of Silverlight-App from local WPF App
    Posted: 23-Feb-2011 at 3:23pm
Hi,
 
is it possible to connect to the EntityService of an existing Silverlight application?
The idea is to make a WPF application that uses this EntityService of an existing
Silverlight application for sharing the data within a local running application.
 
If it's possible, please give me some hints how to configure the WPF application
to get it work, cause I've tried already but it didn't work.
 
Thanks
Andrew
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 24-Feb-2011 at 1:45pm
Hi Andrew;

You should be able to connect to an existing Silverlight application entity service by changing the WPF application app.config file.

For example, if I have an existing WPF application called WpfApplication1, my current app.config will contain the following:

    <objectServer remoteBaseURL="http://localhost" serviceName="WpfApplication1/EntityService.svc">
      <clientSettings isDistributed="true" />
    </objectServer>

I have another Silverlight application called SilverlightApplication1 whose EntityService is located on the following address:

http://localhost/SilverlightApplication1/entityservice.svc

To allow my WpfApplication1 to connect to this SilverlightApplication1 EntityService, I just changed my WpfApplication1 app.config to the following:

    <objectServer remoteBaseURL="http://localhost" serviceName="SilverlightApplication1/EntityService.svc">
      <clientSettings isDistributed="true" />
    </objectServer>

If you have already tried this, could you give me more info as to how your existing Silverlight app is configured and deployed? Any additional info on what you have tried and didn't work will help as well.
Back to Top
Andrew View Drop Down
Newbie
Newbie
Avatar

Joined: 18-Feb-2010
Location: Germany
Posts: 17
Post Options Post Options   Quote Andrew Quote  Post ReplyReply Direct Link To This Post Posted: 24-Feb-2011 at 2:01pm
Hi Denis,
 
thank you for your reply.
So I'm happy that it will work.
 
Then the next question is how to share the same entity model.
I would like to have one entity model that will be referenced from the silverlight and the wpf application.
Is this possible?
 
Can I have the same type of EntityManager from my entities then?
Which files do I have to reference?
 
Thank you
Andrew
 
 
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 24-Feb-2011 at 3:38pm
Hi Andrew,

The entity model you create on the web server is the one you use in WPF. If you currently have it inside the web project, and not as a separate, then you may want to think about having it structured like this:

MyModel.Desktop (Namespace MyModel)
     Edmx

MyModel.SL (Namespace MyModel)
     Linked Edmx


SL Application - Reference to MyModel.SL
Web Project - Reference to MyModel.Desktop
WPF Application - Reference to MyModel.Desktop
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down