I currently have an EF entity with a navigation properly, something like:
public class Person
{
public int Id { get;set;};
public string Name { get;set;};
public virtual Office WorkingAt { get;set;}
}
public class Office
{
public int Id {get;set;}
public string Name { get;set;}
public string Address {get;set;}
}
I'd like to change from using a "Navigation Property" for WorkingAt
to a simple reference to the Id of the Office
object.
How do I go about doing this? I'm not clear on what the migration path should be.
I already have data in my database, and the Person
table contains an Office_Id
column which I'd like to keep using.