public RedirectToRouteResult MakeObsolete(MakeCourseObsoleteCommand command) { if (!ModelState.IsValid) return this.RedirectToAction(c => c.MakeObsolete(command.CourseId)); _commandService.Execute(command); return this.RedirectToAction(c => c.Details(command.CourseId)); }
public void WhenIMakeTheCourseObsolete() { var cmd = new MakeCourseObsoleteCommand() { CourseId = DomainHelper.GetEventSourceId<Course>() }; DomainHelper.WhenExecuting(cmd); }