Exemplo n.º 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.Length(int.MaxValue);
     //instance.CustomSqlType("image");//.CustomType("BinaryBlob");
 }