コード例 #1
0
ファイル: Company.cs プロジェクト: Pechalka/Diplome
 public void AddReview(AddReviewToCompanyCommand command)
 {
     Apply(new CompantReviewAddedEvent
                    {
                        AggregateRootId = Id,
                        Date = DateTime.Now,
                        IsGood = command.Type == AddReviewToCompanyCommand.ReviewType.Good,
                        Text = command.Text
                    });
 }
コード例 #2
0
        public ActionResult Reviews(AddReviewToCompanyCommand form)
        {
            var redirect = RedirectToAction("Reviews", new {id = form.CompanyId});

            return Handle(form, redirect, redirect);
        }