I'm new to MVC, I have a model named Person
containing these fields:
name
,family
,email
,UserID
I want to create a 1:1 relationship between User table in SqlMembership and Person table in my DataBase(newsAgent.mdf)-I want to extend User table by creating this relationship,I'm using Database first approach.so I have 2 questions:
1-Where are generated tables belong to SqlMembership?how can I see them?
2-how can I join these 2 tables to have 1:1 relationship?
There should be a connection string in your web.config identifying where the membership database is located.
The User table in that database is where you will find the "SqlMembership" (MembershipUser) data.
If you'd like to correllate them you should add a property to your Person entity and store the 'ProviderUserKey' property from the Membership User table.
See this MSDN article for some context: http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.provideruserkey.aspx