public virtual void When(IGoodIdentificationTypeStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
protected virtual IGoodIdentificationTypeStateDeleted Map(IDeleteGoodIdentificationType c) { var stateEventId = new GoodIdentificationTypeEventId(c.GoodIdentificationTypeId, c.Version); IGoodIdentificationTypeStateDeleted e = NewGoodIdentificationTypeStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
void IGoodIdentificationTypeState.When(IGoodIdentificationTypeStateDeleted e) { throw new NotSupportedException(); }
public virtual void Delete(IDeleteGoodIdentificationType c) { IGoodIdentificationTypeStateDeleted e = Map(c); Apply(e); }
public virtual GoodIdentificationTypeStateDeletedDto ToGoodIdentificationTypeStateDeletedDto(IGoodIdentificationTypeStateDeleted e) { var dto = new GoodIdentificationTypeStateDeletedDto(); dto.GoodIdentificationTypeEventId = e.GoodIdentificationTypeEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
public void AddGoodIdentificationTypeEvent(IGoodIdentificationTypeStateDeleted e) { _innerStateEvents.Add((GoodIdentificationTypeStateDeletedDto)e); }