コード例 #1
0
        public IDecorationCommandImplementation Get(IDataManipulationCommand command)
        {
            var connectionFactory            = new ConnectionFactory();
            var connection                   = connectionFactory.Get(command.ConnectionString);
            IDataManipulationFactory factory = null;

            if (connection is SqlConnection)
            {
                factory = new SqlServerDataManipulationFactory();
            }

            if (factory != null)
            {
                return(factory.Get(command));
            }

            throw new ArgumentException();
        }
コード例 #2
0
        public IDecorationCommandImplementation Get(IDataManipulationCommand command)
        {
            var sessionFactory = new ClientProvider();
            var connection     = sessionFactory.Instantiate(command.ConnectionString).CreateNew() as IDbConnection;
            IDataManipulationFactory factory = null;

            if (connection is SqlConnection)
            {
                factory = new SqlServerDataManipulationFactory();
            }

            if (factory != null)
            {
                return(factory.Get(command, connection));
            }

            throw new ArgumentException();
        }