New Posts New Posts RSS Feed: Global Entity Manager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Global Entity Manager

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

Joined: 14-Jun-2007
Location: United States
Posts: 7
Post Options Post Options   Quote DocScooter Quote  Post ReplyReply Direct Link To This Post Topic: Global Entity Manager
    Posted: 31-Mar-2009 at 7:35am
In the classic DF, I was able to create the equivilent of the EntityManager, the PersistanceManager in such a way using that I could use it with multiple forms and everything would be in sync.  Is that a possibility with Silverlight and if so how?
 
Thanks
Scott 
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: 31-Mar-2009 at 8:46am
Yes, put it in the App.xaml.cs/vb

private DomainModelEntityManager manager;

public DomainModelEntityManager Manager
{
        get { return manager; }
}

    Private mManager As DomainModelEntityManager
    Public ReadOnly Property Manager() As DomainModelEntityManager
        Get
            Return mManager
        End Get
    End Property

In the Application_Startup event make sure you set manager to something.


In your project you can then do something like this:

 ((App)App.Current).Manager;
TryCast(App.Current, App).Manager
Back to Top
DocScooter View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 7
Post Options Post Options   Quote DocScooter Quote  Post ReplyReply Direct Link To This Post Posted: 31-Mar-2009 at 8:51am
Sweet!  Thanks alot!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down