New Posts New Posts RSS Feed: Where's CheckpointManager?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Where's CheckpointManager?

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: Where's CheckpointManager?
    Posted: 03-Jun-2010 at 5:00pm

Here's one way to do this:

1)  Create a secondary EntityManager.
2)  Import the Entities you think you'll need for the workflow from the primary EntityManager to the secondary EntityManager.
3)  Start the wizard, make changes to the objects in the secondary EntityManager.
4a)  If you want to discard the changes.  Just "throw out" the secondary EntityManager.  It will get garbage collected when all references are gone.  The primary EntityManager still has the original copy of the Entities.
4b)  If you want to keep the changes.  Import the cache from the secondary EntityManager to the primary EntityManager with a MergeStrategy of OverwriteChanges.
 
So, basically, you can save/replicate the state of an entity cache by importing the Entities to another EntityManager, or by using the Entitymanager.CacheStateManager to save it to a stream.
 
Back to Top
mikewishart View Drop Down
Groupie
Groupie
Avatar

Joined: 26-Feb-2010
Location: Reno, NV
Posts: 49
Post Options Post Options   Quote mikewishart Quote  Post ReplyReply Direct Link To This Post Posted: 03-Jun-2010 at 4:08pm
Along the same lines, what is the recommended way to handle saving the state of the entity manager before going into a wizard and having it rollback if the user cancels?  The CheckpointManager seemed to be the way to do this.  Should I just figure out what entities were added and remove them?  How do we undo changes to entities that were modified?

Thanks,
Mike
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 26-Apr-2010 at 3:55pm

No, we were able to simplify the configuration so that the <edmKeys> are no longer needed.  Just make sure the database information is in the <connectionStrings> node of the app.config.

Back to Top
DavidKozikowski View Drop Down
Groupie
Groupie
Avatar

Joined: 02-Feb-2010
Location: Aurora, IN
Posts: 59
Post Options Post Options   Quote DavidKozikowski Quote  Post ReplyReply Direct Link To This Post Posted: 23-Apr-2010 at 10:59am

What is the recommend way to use Multi entity managers with an application?

 

I have a sql db and a oracle db that I'm moving data to and from.

 
I have 2 entity managers.
 

I have created ADO.Net Entity Diagrams for both.

 

Do I have to use the<edmKeys> config format to use them?

 
 
 
 
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 22-Apr-2010 at 5:03pm
Hi Chuck,
 
The one thing we did remove in DevForce 2010 was the CheckpointManager - sorry for the surprise.  There were few people using it, and we now recommend the more general approach of using multiple EntityManagers and importing entites between them.
 
Back to Top
chuckc View Drop Down
Groupie
Groupie


Joined: 27-Feb-2010
Posts: 54
Post Options Post Options   Quote chuckc Quote  Post ReplyReply Direct Link To This Post Posted: 21-Apr-2010 at 7:59pm
CheckpointManager used to be accessible from EntityManager in previous versions, but is no longer there in DevForce 2010.  Has it been discontinued, or re-located?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down