private async Task Handle(ArticleCreatedEvent @event) { await Repository.Add(@event.ArticleId, new JObject( new JProperty("ArticleId", @event.ArticleId), new JProperty("Available", true), new JProperty("Sold", new JArray()), new JProperty("Description", @event.Description), new JProperty("Price", @event.Price))); }
private void Apply(ArticleCreatedEvent @event) { _available = true; _price = @event.Price; }