Search code examples
asp.netasp.net-membershippaddingsqlmembershipprovider

Extending ASP.NET Membership Provider, PK == FK == OK?


I'm using the SQLMembershipProvider and want to add a load more info about the users. It the best way to do this to create a new DB and make an entry for each new user as they are created? If so, is there any reason not to use the SQLMembershipProvider UserID value as the PK in the users table in my new DB?

Or, are there any good reasons to create a new UserID in my new DB and use the SQLMembershipProvider UserID as the FK?


Solution

  • I cannot think of a reason why that wouldn't work or why you shouldn't do it that way (userid as PK)

    I'm not sure why you'd use a separate database for everything, I'd probably just create the table in the current database and set it up using the userid as a FK to the aspnet_users table.