public override void Handle(ArticleGroupEvents.Created message) { ArticleGroupDto dto = this.Load(message.ArticleGroupId); if (dto != null) throw new Exception("Item with the same Id already created!"); dto = new ArticleGroupDto(); dto.ArticleGroupId = message.ArticleGroupId; this.Save(dto); }
public override void Handle(ArticleGroupEvents.NoteChanged message) { ArticleGroupDto dto = this.Load(message.ArticleGroupId); dto.Note = message.Note; this.Save(dto); }
public void When(ArticleGroupEvents.NoteChanged e) { this.Note = e.Note; }
public void When(ArticleGroupEvents.Created e) { this.ArticleGroupId = e.ArticleGroupId; }