سؤال

What's the difference between SimpleMembershipProvider.CreateAccount and SimpleMembershipProvider.CreateUser ? Which one should i use ? Also, WebSecurity only has createAccount and createAccountAndUser, why isn't there a createUser alone?

هل كانت مفيدة؟

المحلول

CreateUser will create a new user in the User table, CreateAccount will create an account in the account table, based on an existing User - you can't create an account until a user is created.

http://msdn.microsoft.com/en-us/library/gg538405(v=vs.111).aspx

http://msdn.microsoft.com/en-us/library/webmatrix.webdata.simplemembershipprovider.createuser(v=vs.111).aspx

The CreateUserAndAccount will create both in a single step: http://msdn.microsoft.com/en-us/library/gg548257(v=vs.111).aspx

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top