ModifiedDate Version Convention
- by Robie
Hi, I am trying to create a fluent Nhibernate automap convention for all the modifiedDate property of my application where it should set the value to get the current date. I am trying the following and its not working. Please advice.
public class ModifiedDateVersionConvention : IVersionConvention,IVersionConventionAcceptance
{
public void Apply(IVersionInstance instance)
{
instance.Default(DateTime.Now);
}
public void Accept(IAcceptanceCriteria<IVersionInspector> criteria)
{
criteria.Expect(x => x.Name == "ModifiedDate");
}
}