Hello,
I'm trying to improve my save/update entity handling scenario by using
ATM. Now I use the following pseudo-method:
Save(Entity e)
success = false
if(e.IsValid)
start trans
try
e.Save
commit
success = true
catch ... end
if not success
flash[xxx] = e
redirect back to edit
else
redirect somewhere
Say I leave transaction start/commit to ATM, how do I handle commit
errors? It's out of the method code, so I don't have (easy) access to
parameters to fill the flash and redirect back to form with the user
filled values. Do I need to resort to writing filters (and adjusting
them per controller/entity)? Which is no better than my current
solution.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---