How to use Membership provider with EF Code First?

后端 未结 6 1802
独厮守ぢ
独厮守ぢ 2020-12-30 01:33

I have models based on EF Code First and I want to use them with the default MembershipProvider, but I don\'t know how to write the model correctly, so it won\'t erase all m

6条回答
  •  时光说笑
    2020-12-30 02:08

    There is also my library which basically allows you to define how almost everything should be configured including: key type, where the your context object is, and where your user/role entities are located. Extendable using abstract base classes or interfaces. Also works quite well out of the box with repository pattern / unit of work / IoC Containers.

    Source: https://github.com/holyprin/holyprin.web.security

    NuGet: https://nuget.org/packages/Holyprin.Web.Security

提交回复
热议问题