New Posts New Posts RSS Feed: POCO and XML Persistence
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

POCO and XML Persistence

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

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: POCO and XML Persistence
    Posted: 27-Apr-2010 at 12:05pm
We provide full CRUD support for POCO objects too.  See page 50 in the "Business Object Persistence - Advanced.pdf" in the Learning Resources.
Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 27-Apr-2010 at 11:23am
You can use a ServerSaving interceptor method.

In that you have access, in a server-side EntityManager, to the entities submitted for a save via EntityManager.SaveChanges(). You could then save those to XML files and either permit the save to the database to continue, or cancel it.

For into on implementing a ServerSaving interceptor, see the section "Server-Side Life Cycle Events" in the "Business Object Persistence" topic document in the Learning Resources.
Back to Top
raustring View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Apr-2010
Location: Antigua
Posts: 3
Post Options Post Options   Quote raustring Quote  Post ReplyReply Direct Link To This Post Posted: 26-Apr-2010 at 6:52am
I'm new to DevForce so this question may seem very basic. Do you have any examples of how to persist POCO changes to XML files. I don't understand how to 'hook in' to the server side code to accomplish this. I would like to have the same model, and client code, but have an option to persist changes to either a database or XML files.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down