EF Code First Fluent API specifying the Foreign Key property June 8, 2023 by Tarik I believe you should be able to do this: HasRequired(t => t.Agent).WithMany().HasForeignKey(t => t.AgentId)