Sql – Asp.net membership

asp.netasp.net-membershipasp.net-mvcsql

If I want to do an admin function like delete a user on the asp.net membership stuff that ships with the asp.net mvc sample.

I tried looking through the tables and realized that there was multiple tables that had rows added. I assume there must be a simpler way.

Best Answer

In your Membership provider there is a method:

public bool DeleteUser(string username, bool deleteAllRelatedData)

If this is the standard asp.net membership provider that method runs a stored proc that cleans the user from your DB.

Here is some more examples: http://www.4guysfromrolla.com/articles/091207-1.aspx