I have a common database that multiple applications use, and one of the tables in that common database is a Person table.
I know I can't have foreign key relationships cross database.
However, I was hoping I could still do something like
public Programmer
{
public virtual Common.Models.Person Person { get; set; }
}
(Programmer is a table in a different database than the person table)
Now, that wants to create a foreign key to a different database, which it can't, so it wants to recreate the tables in the database with the Programmer table.
I don't want that to happen, I just want to be able to do Programmer.Person and it grab the person model from the common database.
Since you can't use FKs which is what makes this possible, is there a way around this? Or what is the best practice to deal with a common database like this?
Thank you.