protected virtual IRejectionReasonStateCreated Map(ICreateRejectionReason c) { var stateEventId = new RejectionReasonEventId(c.RejectionReasonId, c.Version); IRejectionReasonStateCreated e = NewRejectionReasonStateCreated(stateEventId); e.Description = c.Description; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
public virtual void When(ICreateRejectionReason c) { Update(c, ar => ar.Create(c)); }
public virtual void Create(ICreateRejectionReason c) { IRejectionReasonStateCreated e = Map(c); Apply(e); }
void IRejectionReasonApplicationService.When(ICreateRejectionReason c) { this.When((CreateRejectionReasonDto)c); }