public override void BeforeSave() { base.BeforeSave(); if (Id == 0) { var e = Provider.Database.Read<EventContact>("EventId={0} AND ContactId={1}", EventId, ContactId); if (e != null) { this.Id = e.Id; this.State = e.State; } } }
public override void BeforeSave() { base.BeforeSave(); if (Id == 0) { var e = Provider.Database.Read <EventContact>("EventId={0} AND ContactId={1}", EventId, ContactId); if (e != null) { this.Id = e.Id; this.State = e.State; } } }