views:

24

answers:

0

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

  1. When schema exported the order table has two columns ICustomer_Id,Customer_Id.
  2. refers to an unmapped class Order exception

Can you please help me out?

related questions