Unknown
Unknown

Reputation: 1397

.NET 4.5, EF 5 and MembershipProvider

Does anyone know if there is going to be created a default MembershipProvider to use with EF 5 (like SqlMembershipProvider and ActiveDirectoryMembershipProvider) or we will still have to create custom ones (that is for Code First of course)?

Upvotes: 4

Views: 2314

Answers (2)

Unknown
Unknown

Reputation: 1397

Actually after the long comments and explanations it results that there will be a default MembershipProvider for EF and - guess what, guess what - it is called EFMembershipProvider. Here is a link.Now this is really cool because third party implementations of MembershipProvider will no longer be needed (or the respective manual implementation - it was kind of BIG and total overkill for small projects).

UPDATE Currently it seems that this provider is not available. I do not know if it will be developed and included in the future either.

Since we are encouraged to use SimpleMembershipProvider and migrations when using EF Code First that is what I am doing now. You can also implement the ExtendedMembershipProvider, which requires a little bit more effort.

For me the best solution for now is to inherit SimpleMembershipProvider and modify only the things that I need (I am using most of the code from my previous implementation of MembershipProvider), for example logging with email or username.

Upvotes: 7

Simon Egli
Simon Egli

Reputation: 31

I've implemented a CodeFirst MembershipProvider & Role with my Silversite CMS ASP.NET library, that can be found at silversite.codeplex.com. The library also supports multiple DbContexts for CodeFirst databases. As far as I know though currently the implementation is broken, and I didn't have the time to fix it yet. Also Profile and Session providers still are lacking. But I've got the code from the MySql providers that should not be too hard to port.

Upvotes: 1

Related Questions