예제 #1
0
        public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
        {
            // instance.CustomType

            if (instance.Type.IsGenericType && instance.Type.GetGenericTypeDefinition() == tp)
            {
                var realType = instance.Type.GenericArguments.First();
                if (realType.IsEnum)
                {
                    instance.CustomType(realType);
                }

            }

            var list = instance.Property.MemberInfo.GetCustomAttributes(typeof(FieldLengthAttribute), true);
            if (list.Length > 0)
            {
                instance.Length(((FieldLengthAttribute)list[0]).Length);
            }
        }
 public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
 {
     instance.CustomType(instance.Property.PropertyType);
 }
 public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
 {
     instance.CustomType("decimal(25,5)");
 }