I\'ve used default MVC template with individual authorization. After running the application it automatically creates the required Identity tables. I\'ve successfully regist
Yes, you should add a foreign key to your table. How to do so depends on how you set up your Entity Framework (EDMX / code first / reverse engineered from database), but this proceduree is explained in plenty other questions. That is a separate question and that has been answered before, try searching.
Now to store the details for a user, you can either create a record in your PersonalInformation table upon registering this user, or checking if it exists when editing a user:
var currentUserId = User.Identity.GetUserId();
// Look up existing record
var personalInformation = _dbContext.PersonalInformation
.FirstOrDefault(p => p.UserId == currentUserId);
if (personalInformation == null)
{
// If not exists, create and attach new record
personalInformation = _dbContext.PersonalInformation.Create();
}
// Map incoming model properties to entity
personalInformation.FirstName = model.FirstName;
personalInformation.Address = model.Address;
// ...
// Add or update the entity in the database
_dbContext.SaveChanges();