Already I have known 3 types of memberships in Microsoft MVC. They are:
Obviously they have differences to use. What is the key advantage for selecting each of them? May somebody describe?
Thanks.
Already I have known 3 types of memberships in Microsoft MVC. They are:
Obviously they have differences to use. What is the key advantage for selecting each of them? May somebody describe?
Thanks.
Jon Galloway的以下帖子非常详细地解释了我认为你在问什么。
本文包含一个类图,显示您列出的所有三个类之间的关系。
相关的外卖报价是这个:
SimpleMembershipProvider 是一个 ExtendedMembershipProvider 的实现,它继承自 MembershipProvider 并添加了一些其他的 account/OAuth 相关的东西。
请务必查看类图,它位于名为SimpleMembership 如何与 ASP.NET Membership 集成的部分中
希望有帮助。
MembershipProvider 是一个抽象类,所有其他成员资格提供者都继承自该类。您不能创建它的实例,因为它是抽象的。
还有其他成员资格提供程序,例如 SqlMembershipProvider 和通用成员资格提供程序,它们也继承自此,更不用说 MySqlMembershipProvider、OracleMembershipProvider 等。
Microsoft 创建了一个更简化的提供程序模型,称为 ExtendedMembershipProvider,它也继承自 MembershipProvider。和 MembershipProvider 一样,ExtendedMembershipProvider 也是抽象的,不能被实例化。你需要继承它。
SimpleMembershipProvider 继承自 ExendedMembershipProvider,可能还有其他的。