public class Customer
{
public int ID { get; set; }
public string Name { get; set; }
public IList<Product> ProductsOwned { get; set; }
}
public class Product
{
public int ID { get; set; }
public string Name { get; set; }
public IList<Customer> Owners { get; set; }
}
Customer
HasManyToMany<Product>(x => x.ProductsOwned)
.WithTableName("CustomerPricing")
.WithParentKeyColumn("CustomerID")
.WithChildKeyColumn("ProductID")
HasManyToMany<Customer>(x => x.Owners)
.WithTableName("CustomerPricing")
.WithParentKeyColumn("ProductID")
.WithChildKeyColumn("CustomerID")