public virtual void When(IShipmentPackageContentMvoStateDeleted e) { ThrowOnWrongEvent(e); this.Deleted = true; this.UpdatedBy = e.CreatedBy; this.UpdatedAt = e.CreatedAt; }
protected virtual IShipmentPackageContentMvoStateDeleted Map(IDeleteShipmentPackageContentMvo c) { var stateEventId = new ShipmentPackageContentMvoEventId(c.ShipmentPackageContentId, c.ShipmentPackageVersion); IShipmentPackageContentMvoStateDeleted e = NewShipmentPackageContentMvoStateDeleted(stateEventId); e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); return(e); }
void IShipmentPackageContentMvoState.When(IShipmentPackageContentMvoStateDeleted e) { throw new NotSupportedException(); }
public virtual ShipmentPackageContentMvoStateDeletedDto ToShipmentPackageContentMvoStateDeletedDto(IShipmentPackageContentMvoStateDeleted e) { var dto = new ShipmentPackageContentMvoStateDeletedDto(); dto.ShipmentPackageContentMvoEventId = e.ShipmentPackageContentMvoEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; return(dto); }
public void AddShipmentPackageContentMvoEvent(IShipmentPackageContentMvoStateDeleted e) { _innerStateEvents.Add((ShipmentPackageContentMvoStateDeletedDto)e); }
public virtual void Delete(IDeleteShipmentPackageContentMvo c) { IShipmentPackageContentMvoStateDeleted e = Map(c); Apply(e); }