コード例 #1
0
        public override void Execute()
        {
            var user = Repository
                       .Query(whereSpecification: new UserByCredentialWhereSpec(Email, Password))
                       .FirstOrDefault();

            if (user == null)
            {
                throw IncWebException.ForServer("Please use correct email and password");
            }

            EventBroker.Publish(new SingInUserEvent(user, RememberMe));
        }
コード例 #2
0
        protected override void Execute()
        {
            var product = new Product()
            {
                Name = "Will be save alone"
            };

            Repository.Save(product);
            if (IsThrow)
            {
                throw IncWebException.ForServer("Test");
            }
        }
        public override void Execute()
        {
            var user = Repository
                       .Query(whereSpecification: new UserByCredentialWhereSpec(Email, Password))
                       .FirstOrDefault();

            if (user == null)
            {
                throw IncWebException.ForServer("Please use correct email and password");
            }

            Dispatcher.Push(new SignInFormCommand()
            {
                Login       = user.Email,
                Id          = user.Id,
                Persistence = RememberMe
            });
        }
コード例 #4
0
        protected override void Execute()
        {
            var product = new Product()
            {
                Name = "Will be save edition 0"
            };

            Repository.Save(product);
            for (int i = 1; i < 10; i++)
            {
                Dispatcher.Push(new InnerCommand()
                {
                    Index = i
                });
            }
            if (IsThrow)
            {
                throw IncWebException.ForServer("Test");
            }
        }
コード例 #5
0
        protected override void Execute()
        {
            var product = new Product()
            {
                Name = "Will be save TEST2 edition 0"
            };

            Repository.Save(product);
            for (int i = 1; i < 10; i++)
            {
                Dispatcher.Push(new InnerCommand()
                {
                    Index = i
                }, setting => { setting.Connection = ConfigurationManager.ConnectionStrings["Main2"].ConnectionString; });
            }

            if (IsThrow)
            {
                throw IncWebException.ForServer("Test");
            }
        }
コード例 #6
0
 protected override string ExecuteResult()
 {
     throw IncWebException.ForServer("Test");
 }