I am using ASP NET MVC with Individual User Accounts as Authentication for my project. In my database, I have an Employees
table which stores info about employees: Id, First Name, Last Name, Address
and so on.
Before registering any account, I want to know how to link users created in the AspNetUsers
table to the ones I have in the Employees
table.
I want to do it via a ForeignKey
which will have the Id
from the AspNetUsers
table as a FK in the Employees
table. The relationship between the two tables must be one-to-one.
I have tried both solutions from this question on SO but both results in errors. I am using Code-First migration.