示例#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;
 }