EntityTwo should contain simple proerty to sto
The only way I've come up with to handle this is, which is admittedly somewhat ugly, is creating a collection and a helper property to represent the one/zero side. Data annotations included for clarity.
public class EntityOne
{
[Key]
public int EntityOneId { get; set; }
public EntityTwo EntityTwo => EntityTwoNavigation?.FirstOrDefault();
public ICollection EntityTwoNavigation { get; set; }
}
public class EntityTwo
{
[Key]
public int EntityTwoId { get; set; }
public int EntityOneId { get; set; }
[ForeignKey("EntityOneId")]
public EntityOne EntityOne { get; set; }
}