public Task Apply(ShoppingCartArticleRemoved @event) { #pragma warning disable CS0253 // Possible unintended reference comparison; right hand side needs cast return(QueryAndUpdateAsync <ShoppingCartArticleViewModel>(x => x.ShoppingCartArticleId == @event.Id, #pragma warning restore CS0253 // Possible unintended reference comparison; right hand side needs cast shoppingCartArticle => { shoppingCartArticle.RemovedAt = @event.DateTime; })); }
public AlmostOrderedArticlesState Apply(ShoppingCartArticleRemoved @event) { RemovedShoppingCartArticles.Add(new ShoppingCartArticleRemovedInfo { Articlenumber = @event.Articlenumber, CustomerId = ShoppingCartCustomersIds[(string)@event.AggregateRootId], CustomerName = ShoppingCartCustomerNames[(string)@event.AggregateRootId], ShoppingCartId = (string)@event.AggregateRootId, RemovedAt = @event.DateTime }); return(this); }
public ShoppingCartState Apply(ShoppingCartArticleRemoved @event) { Debug.WriteLine($"Article removed '{@event.Articlenumber}'"); return(this); }