When using the OnDelete or OnUpdate partial methods in the DataContext (to say, cascade deletes to a child object) you may find that the object itself doesn't get deleted.
This was surprising to me. The reasoning makes sense, though. These partial methods totally replace the regular delete processing. They aren't a "pre" or "post" delete; they are "instead of" delete.
To make the original object actually get deleted, you should call ExecuteDynamicDelete(instance).
As seen here.
Tuesday, May 18, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment