Пример #1
0
        static void mapper_BeforeMapManyToOne(
            NHibernate.Mapping.ByCode.IModelInspector modelInspector, 
            NHibernate.Mapping.ByCode.PropertyPath member, 
            NHibernate.Mapping.ByCode.IManyToOneMapper propertyCustomizer)
        {
            /*
             
                public class Product
                {
                    protected internal  int                             ProductId       { get; set; }

                    public              TheProduction.ProductCategory   ProductCategory { get; protected internal set; }
                    public              string                          ProductName     { get; protected internal set; }
                }
             
             */

            // ProductCategory property name maps to ProductCategoryId column name
            propertyCustomizer.Column(member.ToColumnName() + "Id");
        }