public virtual void When(IPhysicalInventoryLineMvoStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
protected virtual IPhysicalInventoryLineMvoStateDeleted Map(IDeletePhysicalInventoryLineMvo c) { var stateEventId = new PhysicalInventoryLineMvoEventId(c.PhysicalInventoryLineId, c.PhysicalInventoryVersion); IPhysicalInventoryLineMvoStateDeleted e = NewPhysicalInventoryLineMvoStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
public virtual void Delete(IDeletePhysicalInventoryLineMvo c) { IPhysicalInventoryLineMvoStateDeleted e = Map(c); Apply(e); }
public virtual PhysicalInventoryLineMvoStateDeletedDto ToPhysicalInventoryLineMvoStateDeletedDto(IPhysicalInventoryLineMvoStateDeleted e) { var dto = new PhysicalInventoryLineMvoStateDeletedDto(); dto.PhysicalInventoryLineMvoEventId = e.PhysicalInventoryLineMvoEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
void IPhysicalInventoryLineMvoState.When(IPhysicalInventoryLineMvoStateDeleted e) { throw new NotSupportedException(); }
public void AddPhysicalInventoryLineMvoEvent(IPhysicalInventoryLineMvoStateDeleted e) { _innerStateEvents.Add((PhysicalInventoryLineMvoStateDeletedDto)e); }