Author: imchaz | Posted on: 9/14/2009 1:28:08 PM | Views : 875

I need to find a way to Delete a User's account and all its related data.  I am think the best way is to use a transaction method.
I know Membership.DeleteUser(userName), deletes all information in:
aspnet_Membership
aspnet_UsersInRoles
aspnet_Profile
aspnet_Users
but I also have table that uses the GUID of the userName in another table:

user_ActivityInfo
When a record is inserted into the user_ActivityInfo table using the GUID, it creates an Reference_Id which I use it to insert all related records in the following tables as a foreign key reference to the following tables:

user_A
user_B
user_C

So how do I properly delete all information from those tables too?  As I stated earlier, I am thinking I need to use some type of Transaction method but I cant seem to get a grasp on how to write this properly.
I know how to write a basic transaction, but looping ...

Go to the complete details ...