.NET 4.5, EF 5, and MembershipProvider

Does anyone know if MemberhipProvider will be created by default for use with EF 5 (e.g. SqlMembershipProvider and ActiveDirectoryMembershipProvider), or will we still have to create custom ones (this, of course, for Code First)?

+4
source share
2 answers

In fact, after long comments and explanations, this leads to the fact that for EF there will be a default membership of MemberhipProvider, and - guess what, guess what - it is called EFMembershipProvider. Here's a link. Now this is really great, because third-party implementations of the MembershipProvider will no longer be needed (or the corresponding manual implementation - it was a kind of BIG and complete excess for small projects).

UPDATE Currently, this provider seems to be unavailable. I do not know whether it will develop and be included in the future.

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

For me, the best solution at the moment is to inherit from SimpleMembershipProvider and change only those things that I need (I use most of the code from my previous implementation of MembershipProvider), for example, registering by email or username.

+7
source

I implemented CodeFirst MembershipProvider and a role with my Silversite CMS ASP.NET library, which can be found at silversite.codeplex.com. The library also supports several DbContext for CodeFirst databases. As far as I know, the implementation is currently broken, and I did not have time to fix it. In addition, profile and session providers are still missing. But I have code from MySql providers that should not be too complicated to port.

+1
source

All Articles