EF4 ASP.NET - Managing Entity Edits between HTTP Posts and Rollback -


I am struggling with the following usage case:

User modifies an existing order The order is complicated - many related 'entities' (addresses, post options, suppliers, creates, models, different items etc.) across multiple HTTP posts.

User wants to discard changes.

-

I have an order unit and as the user is editing it, various changes like unit associations, such as changing order.adression, order.it.ed. (item). ..

This is okay in a single post, but in all the posts I do not know the best store state. If I store the entities, then I can not save the changes because they are in various data contexts. I have read that this bad practice is to store data reference in the context of the session i.e. Long-Term References I can not save changes after every edit / post because I can not roll-back (?) I really want to work with entities during the editing process instead of saving a bigger one (UI Taking the settings and applying them in one part).

This would be a very common problem - it's driving me crazy.

We have a similar problem where we have a complex business object through a multi-page wizard are building.

Instead of creating partial complete business objects at each stage of the wizard, we create a dedicated wizard object that looks like business object, through each wizard in that pop up wizard, at every step, Wizard object is saved in database. In the end, the user can accept it and it is converted to an actual business object and then becomes visible to everyone, or they can bind it and no one else knows that it exists.

The approach was not suitable, I suspect that you are looking at some kind of difference tracking, unit or database level. Systems are not easy to implement, manage, or manage. There will be changes in units for any kind of calculation and collection and an algorithm development, depending on your RDBMS later, but may include rows or parallels in it.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -