public virtual void When(IRejectionReasonStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
protected virtual IRejectionReasonStateDeleted Map(IDeleteRejectionReason c) { var stateEventId = new RejectionReasonEventId(c.RejectionReasonId, c.Version); IRejectionReasonStateDeleted e = NewRejectionReasonStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public virtual void Delete(IDeleteRejectionReason c) { IRejectionReasonStateDeleted e = Map(c); Apply(e); }
public virtual RejectionReasonStateDeletedDto ToRejectionReasonStateDeletedDto(IRejectionReasonStateDeleted e) { var dto = new RejectionReasonStateDeletedDto(); dto.RejectionReasonEventId = e.RejectionReasonEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
public void AddRejectionReasonEvent(IRejectionReasonStateDeleted e) { _innerStateEvents.Add((RejectionReasonStateDeletedDto)e); }
void IRejectionReasonState.When(IRejectionReasonStateDeleted e) { throw new NotSupportedException(); }