Fluent Mapping I Have the following scenario
public class CustomerMap : ClassMap { public CustomerMap() { Table("Customer"); Id(c => c.Id); Map(c => c.Name); HasMany(c => c.Orders); } }
public class OrderMap : ClassMap<IOrder>
{
public OrderMap()
{
Table("Orders");
References(o => o.Customer).Access.;
Id(o => o.Id);
Map(o => o.DateCreated);
}
}
Problems
- When schema exported the order table has two columns ICustomer_Id,Customer_Id.
- refers to an unmapped class Order exception
Can you please help me out?