SaveChanges()
will save the new Movie- but it also saves a new Director record (which
gets a new Id, even though you set it manually). When you add an entity
to a DbSet, the entire object graph is marked as “Added”.

You
could do a Find to load the Director record from the database, but it
is a pointless database access that you don’t need. It just needs to
save the Movie record with a known directorId.

In
NHibernate you can use session.Load<Director>(andrewStantonId)
which will create an empty proxy object without hitting the database.
Only if you use one of the proxy properties (like director.Name) will it
hit the database to load the record. EF Code First doesn’t have this
feature.

One way round it to add a foreign key Id property to the Movie record:

You
can then set the DirectorId directly. The two properties are not kept
in step automatically, so setting the DirectorId doesn’t cause Director
to load from the database. Foreign key Id properties are convenient, but your object model is “denormalized”.

The alternative is to mark the dummy record as unchanged. There are two ways.

One is to set the context.Entry state for the dummy reference AFTER the new record has been added.