I'm trying to adapt these conventions for my project.
- Not-Null as the default
- 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