Пример #1
0
        public void Handle(NewsPublishedEvent @event)
        {
            var tmpNews = News.FirstOrDefault(news => news.Id == @event.NewsId);

            if (tmpNews != null)
                tmpNews.Status = "Published";
        }
Пример #2
0
 private void UpdateFrom(NewsPublishedEvent @event)
 {
     _status = enumNewsStatus.Published;
 }