I have 2 entities like below;

```
public class Order
{
  public int Id { get; set; }
  public Description { get; set; }

 public virtual Purchase Purchase{ get; set;}
}

public class Purchase
{
 public int Id { get; set; }
 public Description { get; set;}
 public int? OrderId { get; set;}

 public virtual Order Order { get; set;}
}

```

Here I create order first. 

1. Based on order i can create purchase.
2. Purchase can be happened without order also. So it is Nullable foreign key.
3. For one order, it should have only one purchase. So OrderId is unique also.

How can i specify this relationship in Code First