code first foreign key to asp membership table

firefly

New Member
I have a table (say, 'MyTable') created using CF. Also, there's asp's Membership table in my DB, which was auto generated along with Users, UserInRoles and Roles tables. These table exist only in the DB, and not as a model (class) in the project.Now, I need to set a foreign key in 'MyTable' to Membership table. The problem is, of course, that there is no 'Membership' class in my project so I can't set that FK with code first.I'd like to keep my users management in the trustful hands of asp.net, so I don't want to create my own tables for this. How can I set that FK using code first?
 
Back
Top