public virtual IOrderItemShipGrpInvReservationEvent GetEvent(OrderItemShipGrpInvResId orderItemShipGrpInvResId, long version) { var e = (IOrderItemShipGrpInvReservationEvent)EventStore.GetEvent(ToEventStoreAggregateId(orderItemShipGrpInvResId), version); if (e != null) { e.ReadOnly = true; } else if (version == -1) { return(GetEvent(orderItemShipGrpInvResId, 0)); } return(e); }
public override bool Equals(object obj) { if (Object.ReferenceEquals(this, obj)) { return(true); } OrderItemShipGrpInvResId other = obj as OrderItemShipGrpInvResId; if (other == null) { return(false); } return(true && Object.Equals(this.OrderId, other.OrderId) && Object.Equals(this.ShipGroupSeqId, other.ShipGroupSeqId) && Object.Equals(this.OrderItemSeqId, other.OrderItemSeqId) && Object.Equals(this.ProductId, other.ProductId) && Object.Equals(this.LocatorId, other.LocatorId) && Object.Equals(this.AttributeSetInstanceId, other.AttributeSetInstanceId) ); }
public abstract IEventStoreAggregateId ToEventStoreAggregateId(OrderItemShipGrpInvResId aggregateId);
public virtual IOrderItemShipGrpInvReservationState GetHistoryState(OrderItemShipGrpInvResId orderItemShipGrpInvResId, long version) { var eventStream = EventStore.LoadEventStream(typeof(IOrderItemShipGrpInvReservationEvent), ToEventStoreAggregateId(orderItemShipGrpInvResId), version - 1); return(new OrderItemShipGrpInvReservationState(eventStream.Events)); }
public virtual IOrderItemShipGrpInvReservationState Get(OrderItemShipGrpInvResId orderItemShipGrpInvResId) { var state = StateRepository.Get(orderItemShipGrpInvResId, true); return(state); }
public OrderItemShipGrpInvReservationEventId(OrderItemShipGrpInvResId orderItemShipGrpInvResId, long version) { this._orderItemShipGrpInvResId = orderItemShipGrpInvResId; this._version = version; }