New Posts New Posts RSS Feed: Is there an event on our Entity class that can tell you when a Entity has been added or removed?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Is there an event on our Entity class that can tell you when a Entity has been added or removed?

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Is there an event on our Entity class that can tell you when a Entity has been added or removed?
    Posted: 12-Jul-2007 at 3:49pm

Is there an event on our Entity class that can tell you when a Entity has been added or removed from the DataSet?  For example, I want to be notified in my app whenever an entity arrives into or is removed from my persistence manager via the following paths: 

  • I execute an RdbQuery and retrieve an entity into my dataset from the database.
  • I create a new entity and add it to the manager via the AddToManager method.
  • I import an entity from another persistence manager via the ImportEntities method.
  • I detach an Entity and it is removed from the persistence manager.
  • I re fetch an Entity and it no longer exists in the database and it is removed from my manager.
Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 3:51pm

The PersistenceManager does not fire events during CreateEntity() or Delete(). However there are events raised by the underlying DataTable class that you can register for, namely TableNewRow and RowDeleting. You always have access to the underlying DataTable via PersistenceManager.GetTable().

Is there such an event that is called that I can register with on the Entity itself?



Edited by IdeaBlade - 13-Jul-2007 at 10:02am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down