public void WhenIChangeTheCourseTitleTo(string title) { var cmd = new ChangeCourseTitleCommand() { CourseId = DomainHelper.GetEventSourceId<Course>(), NewTitle = title }; DomainHelper.WhenExecuting(cmd); }
public RedirectToRouteResult ChangeTitle(ChangeCourseTitleCommand command) { if (!ModelState.IsValid) return this.RedirectToAction(c => c.ChangeTitle(command.CourseId)); _commandService.Execute(command); return this.RedirectToAction(c => c.Details(command.CourseId)); }