I need help. I have three static table (Dictionary of Country, Region and Cities). I set this tables in my Initilizer class. I need to create One to Many relation with my own User table without created Foregion Key in dictionaries tables by Fluent API.
Dictionary Tables (Countries, Regions and Cities):
My User table:
public class UserWorker
{
public UserWorker()
{
Countries = new List<DCountry>();
Regions = new List<DRegion>();
Cities = new List<DCity>();
Professions = new List<DProfession>();
}
public int UserWorkerId { get; set; }
public virtual ICollection<DCountry> Countries { get; set; }
public virtual ICollection<DRegion> Regions { get; set; }
public virtual ICollection<DCity> Cities { get; set; }
public virtual ICollection<DProfession> Professions { get; set; }
}
How I can add relation without UserWorker_UserWorkerId ?
P.S: I have another two my own table that need to connect by the same relation One to Many by Fluent API.
I don't understand how i can add Objects dictionary lists to my own table without create virtual foregion key in my static table.