public virtual void When(IGoodIdentificationStateRemoved e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
}// END Map(IMergePatch... //////////////////////////// protected virtual IGoodIdentificationStateRemoved MapRemove(IRemoveGoodIdentification c, IProductCommand outerCommand, long version) { c.RequesterId = outerCommand.RequesterId; var stateEventId = new GoodIdentificationEventId(c.ProductId, c.GoodIdentificationTypeId, version); IGoodIdentificationStateRemoved e = NewGoodIdentificationStateRemoved(stateEventId); e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }// END Map(IRemove... ////////////////////////////
public virtual GoodIdentificationStateRemovedDto ToGoodIdentificationStateRemovedDto(IGoodIdentificationStateRemoved e) { var dto = new GoodIdentificationStateRemovedDto(); dto.GoodIdentificationEventId = e.GoodIdentificationEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; return(dto); }
public void AddGoodIdentificationEvent(IGoodIdentificationStateRemoved e) { _innerStateEvents.Add((GoodIdentificationStateRemovedDto)e); }
void IGoodIdentificationState.When(IGoodIdentificationStateRemoved e) { throw new NotSupportedException(); }