简体   繁体   中英

ASP.NET MVC5 Identity Customizing

is there a way to customize the database access in the new MVC5 identity?

I don´t use the DbContext in my web project, because I created some security and validation layers for database access.

Do I have to derive from UserManager or UserStore, implement the interfaces IUserPassword store or something like that?

I heard something about an API to customize identity, but how can I use this API?

You need to implement your own UserStore and User types to match the schema that you want. You will have to implement the Interfaces for the features that you want in your system You can reuse the UserManager since UserManager just uses the UserStore and User that you pass in.

The following article explains you in detail how to do it http://www.asp.net/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM