Note Live Persistence = false; 1 record in the entity collection.
I am creating my own form structure which contains an entity spread over multiple tabs. When the user posts causing a tab change, I wish to unbind the changes on the current tab directly back to the entity in the datasource control. These changes can then be reflected in the new tab as I can rebind my controls against the entity in the contained collection. This action will mark the entity as dirty but does not create a unit of work. I wish my user to make changes across all the tabs before saving to the database.
Note: Im trying to avoid the Microsoft controls such as formview and gridview as developer control over the binding process is at best tenuous. (Weve all had selected value not in dropdownlist and the page explode in an asp trace stack error). In addition this functionality is unlike the Microsoft provided controls as to see the reflected changes in the new tab using formview etc I would be forced to save to the db on every tab change)
I wish use the llblgenpro datasource almost like a rollback segment. User can perform changes to the data and see those outcome of the changes on the entity without commiting incomplete transactions to the database.
The datasource control only provides a protected executeupdate targeting microsoft binding (via collection of old and new values) which does create a unit of work.
My question is if I unbind my controls directly to the entity in the contained collection in a bespoke fashion (to allow better handling of binding errors). I need a method I can call to check if the entity is dirty and if so create the unit of work.
As the datasource exhibits this unit of work as a property I could then save this to the database when the user clicks save.