Why is this so #$*% hard? Shouldn't be.
Two tables Orders & Shippers: Orders.ship_via, an int is the FK to Shippers.ShipperId Shippers.ShipperId is the PK on Shippers
My entities:
public class Order : Entity
{
public int OrderId { get; set; }
public int ShipVia { get; set; }
//More properties
public virtual Shipper Shipper { get; set; }
}
public class Shipper : Entity
{
public int ShipperId { get; set; }
//More properties
}
When I run this, EF tries to naturally populate Order.Shipper using Order.ShipperId which doesn't exist.
I don't want to use annotations. How do I create the fluent map?
(Note: my test environment uses Northwind if you want to run tests).