コード例 #1
0
        public ShoppingCartArticleState Apply(ShoppingCartArticlePlaced @event)
        {
            var s = this;// new ShoppingCartArticleState(this);

            s.AggregateRootId = (string)@event.AggregateRootId;
            s.Id            = (string)@event.Id;
            s.ArticleId     = @event.ArticleId;
            s.Articlenumber = @event.Articlenumber;
            s.Description   = @event.Description;
            s.Price         = @event.Price;
            s.Total         = @event.Total;
            s.Quantity      = @event.Quantity;
            s.CreatedAm     = @event.DateTime;
            s.Active        = true;

            return(s);
        }
コード例 #2
0
 public ShoppingCartArticleState(ShoppingCartArticlePlaced @event)
 {
     Apply(@event);
 }