Esempio n. 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));
        }
        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
            });
        }
        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");
            }
        }
        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");
            }
        }
 protected override string ExecuteResult()
 {
     throw IncWebException.ForServer("Test");
 }