简体   繁体   中英

ASP.NET MVC - delete a user in default account system?

How does one 'properly' delete a user from the system in ASP.NET MVC?

I have a Customers controller which ties into the default Account controller well for the most part but when it comes to deleting them, deleting from the Customers table isn't enough as the user name is now effectively "reserved".

Solution:

System.Web.Security.Membership.DeleteUser(username);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM