fluent NHibernate: many-to-many relationship with Product to Product.how i can implement it on asp.net mvc
public class Product
{
public virtual int Id { get; set; }
public virtual IList<Product> ManyProduct { get; set; }
}
Mapping
public class ProductMap : ClassMap<Product>
{
public ProductMap()
{
Id(x => x.Id);
Map(x => x.ImageUrl);
}
HasManyToMany(x => x.ManyProduct)
.Cascade.All()
.Table("ProductInProduct");
}