views:

32

answers:

0

I'm trying to adapt these conventions for my project.

  1. Not-Null as the default
  2. Varchar instead of nvarchar

I attempted the first one using the following code. However, it didn't work.

    public void Accept(IAcceptanceCriteria<FluentNHibernate.Conventions.Inspections.IPropertyInspector> criteria)
    {
        criteria.Expect(c => c.Property.PropertyType.IsGenericType.GetType().Equals(typeof(Nullable<>)));
    }


    public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
    {
        instance.Not.Nullable();
    }

TIA