public static OrderItemState.Result Create(OrderItemId id, OrderId orderId, ProductId productId, decimal unitPrice, decimal discount) => new OrderItemState(id, productId, unitPrice, discount).ApplyEvent(new OrderItemAddedEvent(id, orderId, productId, unitPrice, discount));
private void EnsureValidState(OrderId id, CustomerId buyerId) => this.ThrowsIf(_ => string.IsNullOrEmpty(id), new ArgumentNullException(id)) .ThrowsIf(_ => string.IsNullOrEmpty(buyerId), new ArgumentNullException(buyerId));
public static OrderState.Result Create(OrderId id, CustomerId buyerId, string city, string street) => new OrderState(id, buyerId).ApplyEvent(new OrderStartedEvent(id, buyerId, city, street));
internal OrderState(OrderId id, CustomerId buyerId) : this() =>