public virtual void When(IInventoryPostingRuleStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
protected virtual IInventoryPostingRuleStateDeleted Map(IDeleteInventoryPostingRule c) { var stateEventId = new InventoryPostingRuleEventId(c.InventoryPostingRuleId, c.Version); IInventoryPostingRuleStateDeleted e = NewInventoryPostingRuleStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
void IInventoryPostingRuleState.When(IInventoryPostingRuleStateDeleted e) { throw new NotSupportedException(); }
public virtual InventoryPostingRuleStateDeletedDto ToInventoryPostingRuleStateDeletedDto(IInventoryPostingRuleStateDeleted e) { var dto = new InventoryPostingRuleStateDeletedDto(); dto.InventoryPostingRuleEventId = e.InventoryPostingRuleEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
public void AddInventoryPostingRuleEvent(IInventoryPostingRuleStateDeleted e) { _innerStateEvents.Add((InventoryPostingRuleStateDeletedDto)e); }
public virtual void Delete(IDeleteInventoryPostingRule c) { IInventoryPostingRuleStateDeleted e = Map(c); Apply(e); }