This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I'm trying to implement an undo feature for "Remove" I guess there are a two different possiblities. 1. An Entity is Removed and saved to db.2. An Entity is Removed but not save to db.In #1, I'll have to create an new Entity and Add. Q: How can I tell that the Entity is removed(saved) from DB? In #2, I'll have to undo "Remove" in memory but "EntityState" is read-only. Q: How do I revert EntityState.Deleted state? Thanks. -chris |
|
|
Can anyone please help? Thanks. -chris |
|
|
|
|
|
Hi, Werner, I've looked at it but it looks pretty obscure to understand. What does it do? I asked two questions. Which one does it answer? I suppose it answer #2, in #2, I want to unmark deleted entities in memory, however, the link you pointed out contains "SaveChanges". Thanks. -chris |
|
|
Chris, It really depends on your environment. My application runs in a web farm so an "in memory" undo manager is pointless; only one server will be aware of the fact. I therefore persist the changes to the database and "undelete" the records when a user selects to undo the operation. Depending on the size of your schema, it can become complicated. I also have a scheduled job that purges records older than 4h. I'm looking forward to the day someone at Mindscape can show how to write a persistent undo manager that can work in a server farm using LightSpeed. Werner |
|