How to set up membership database tables created by ASP.NET?

I want to add custom columns to some tables created by ASP.NET. For instance; I need to add two fields, such as FirstName and LastName, to the aspnet_Membership table.

I can add this directly by editing the table, but

  • Is it right to do this (I mean: expanding the table directly) OR should I create a separate table and store additional user data?

  • How can I see these custom database fields as properties when the code completes? example: membershipuser.FirstName;

thank.

+3
source share
4 answers

profiles , . .

- , .

asp.net.

+3

! . asp.net membershipprovider

http://www.davidhayden.com/blog/dave/archive/2007/10/11/CreateCustomMembershipProviderASPNETWebsiteSecurity.aspx

you can also go with a membership provider starter kit if your MVC'ish application is on codeplex

http://mvcmembership.codeplex.com/

0
source

I recommend that you create a custom membership provider if your application needs features that go beyond the basics provided by the ASP.NET membership provider.

-1
source

Source: https://habr.com/ru/post/1751104/


All Articles