I have had a similar problem lately.
The created class has a partial method for "OnValidate". Just declaring a method in your partial will cause it to call (vb.net does not support partial methods such as C #), or in C # just declaring a partial method.
System.Data.Linq.ChangeAction, : , , .
, , .
public partial class Address
{
private partial void OnValidate(System.Data.Linq.ChangeAction action)
{
if (action == System.Data.Linq.ChangeAction.Insert)
{
var created = DateTime.Now;
this._Modified = created;
this._Created = created;
} else if (action == System.Data.Linq.ChangeAction.Update) {
this._Modified = DateTime.Now;
}
}
}