random .NET and web development musings

You use a convention!

public class StringPropertyConvention : IPropertyConvention, IPropertyConventionAcceptance
{
	public void Apply(IPropertyInstance instance)
	{
		instance.Length(4001);
	}

	public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria)
	{
		criteria.Expect(x => x.Property.PropertyType == typeof (string));
	}
}

:D

Make sure you register the conventions with the automapper.

Peace

NO COMMENTS
Post a comment