New Posts New Posts RSS Feed: Is there a way to get delete an entity and get reference of that entity and pass to SaveChanges?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Is there a way to get delete an entity and get reference of that entity and pass to SaveChanges?

 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 a way to get delete an entity and get reference of that entity and pass to SaveChanges?
    Posted: 12-Jul-2007 at 4:50pm

I have a question for you with regards deleting entities. In the older version we used to call the delete on an entity but we could still retain the reference of that entity which we pass to PersistanceManager.SaveChanges(IList pDatarows….)

With the new DevForce (generics), the Entity is getting deleted from the EntityList<T> after a Delete() is called on the Entity. And so, the reference is lost and the only option we have is to call PersistanceManager.SaveChanges() [without passing any entity itself].

Is there a way to delete an entity and get a reference to that entity and pass it to SaveChanges of PersistenceManager to exclusively call savechanges on those specific entity list? 

I appreciate your response on this.

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: 12-Jul-2007 at 4:57pm

There is a property on EntityList named ShouldRemoveDeletedEntities that should do what you want.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down