コード例 #1
0
        public void Handle(AddDelegateCommand command)
        {
            var sessionDelegate = new SessionDelegate(command);

            delegateRepository.Insert(sessionDelegate);
            delegateRepository.Save();
        }
コード例 #2
0
        public ActionResult AddSessionDelegate(AddDelegateCommand command)
        {
            var errors = mediator.ProcessCommand(command);

            if (errors.Any())
            {
                //diplay errors to the user
                return(View(errors));
            }

            return(RedirectToAction("Index", "SessionDelegate"));
        }
コード例 #3
0
ファイル: 2.Consumer.cs プロジェクト: trailmax/CQRS.Talk
        public ActionResult AddSessionDelegate(AddDelegateCommand command)
        {
            var errors = mediator.ProcessCommand(command);

            if (errors.Any())
            {
                //diplay errors to the user
                return View(errors);
            }

            return RedirectToAction("Index", "SessionDelegate");
        }
コード例 #4
0
ファイル: 2.Consumer.cs プロジェクト: trailmax/CQRS.Talk
        public ActionResult AddSessionDelegate(AddDelegateCommand command)
        {
            var errors = addValidator.GetErrorList(command);

            if (errors.Any())
            {
                //diplay errors to the user
                return View(errors);
            }

            addHandler.Handle(command);
            return RedirectToAction("Index", "SessionDelegate");
        }
コード例 #5
0
ファイル: 2.Consumer.cs プロジェクト: trailmax/CQRS.Talk
        public ActionResult AddSessionDelegate(AddDelegateCommand command)
        {
            var errors = addValidator.GetErrorList(command);

            if (errors.Any())
            {
                //diplay errors to the user
                return(View(errors));
            }

            addHandler.Handle(command);
            return(RedirectToAction("Index", "SessionDelegate"));
        }
コード例 #6
0
ファイル: 0.Dependencies.cs プロジェクト: trailmax/CQRS.Talk
 public SessionDelegate(AddDelegateCommand command)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
ファイル: 3.Consumer.cs プロジェクト: trailmax/CQRS.Talk
        public ActionResult AddSessionDelegate(AddDelegateCommand command)
        {
            addHandler.Handle(command);

            return RedirectToAction("Index", "SessionDelegate");
        }
コード例 #8
0
ファイル: 0.Dependencies.cs プロジェクト: trailmax/CQRS.Talk
 public SessionDelegate(AddDelegateCommand command)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
ファイル: BasicCommands.cs プロジェクト: trailmax/CQRS.Talk
 public void Handle(AddDelegateCommand command)
 {
     var sessionDelegate = new SessionDelegate(command);
     delegateRepository.Insert(sessionDelegate);
     delegateRepository.Save();
 }