I have 2 separate databases, and therefore 2 separate DbContext in ASP.Net Core/EFCore.
I have an object that is in one database, which has a "foreign key" which points on another database.
Let's say I have a database filled with events, and another geographic database with cities. I have a cityId on my event class.
public class Event
{
public int Id {get;set;}
public string Name {get;set;}
public string CityId {get;set;}
public virtual City City {get;set;}
}
public class City
{
public int Id {get;set;}
public string Name {get;set;}
}
Is it possible to Include
the City property in some way when querying the first DbContext?