public void When(ArticleCreated articleCreated) { Id = articleCreated.Id; Title = articleCreated.Title; Content = articleCreated.Content; Status = ArticleStatus.Creating; }
public Task Apply(ArticleCreated @event) { var article = new ArticleOverviewViewModel { ArticleId = @event.Id, Articlenumber = @event.Articlenumber }; return(InsertAsync(article)); }
public Task Apply(ArticleCreated @event) { var article = new ArticleActivationHistoryArticleViewModel { ArticleId = @event.Id, Articlenumber = @event.Articlenumber }; return(InsertAsync(article)); }
public Task Apply(ArticleCreated @event) { var article = new ArticleViewModel { ArticleId = @event.Id, Articlenumber = @event.Articlenumber, Description = @event.Description, PriceIsoCode = @event.Price.IsoCode, PriceValue = @event.Price.Value, Active = true }; return(InsertAsync(article)); }