Lets say i have this entity
public class Address : Entity
{
public Address()
{
ModifiedDate = DateTime.Now;
}
[NotNull]
public virtual Province Province { get; set; }
[NotNullNotEmpty]
[Length(Max = 80)]
public virtual string Line1 { get; set; }
[Length(Max = 80)]
public virtual string Line2 { get; set; }
[NotNullNotEmpty]
[Length(Max=50)]
public virtual string City { get; set; }
[NotNullNotEmpty]
[Length(Max = 15)]
public virtual string PostalCode { get; set; }
[NotNull]
public virtual DateTime ModifiedDate { get; set; }
}
i want the ModifiedDate to be updated before every SaveOrUpdate call? How can i do that ?
Is there a way to hook up something in the repository?