Example #1
0
 public void AddReview(AddReviewToCompanyCommand command)
 {
     Apply(new CompantReviewAddedEvent
                    {
                        AggregateRootId = Id,
                        Date = DateTime.Now,
                        IsGood = command.Type == AddReviewToCompanyCommand.ReviewType.Good,
                        Text = command.Text
                    });
 }
Example #2
0
        public ActionResult Reviews(AddReviewToCompanyCommand form)
        {
            var redirect = RedirectToAction("Reviews", new {id = form.CompanyId});

            return Handle(form, redirect, redirect);
        }