コード例 #1
0
ファイル: QueryCommandBugs.cs プロジェクト: 6nop/SubSonic-3.0
        public void QueryCommand_Should_Respect_CommandType_When_Creating_DbCommands()
        {
            var provider = ProviderFactory.GetProvider("Northwind");
            QueryCommand q = new QueryCommand("SELECT * FROM Orders", provider);
            q.CommandType = CommandType.StoredProcedure;

            var dbCommand = q.ToDbCommand();

            Assert.Equal(CommandType.StoredProcedure, dbCommand.CommandType);
        }
コード例 #2
0
ファイル: QueryCommandBugs.cs プロジェクト: 6nop/SubSonic-3.0
        public void GitHub_Issue149_QueryCommand_Should_Respect_Timeout_When_Creating_DbCommands()
        {
            var provider = ProviderFactory.GetProvider("Northwind");
            QueryCommand q = new QueryCommand("SELECT * FROM Orders", provider);
            q.CommandTimeout = Timeout;

            var dbCommand = q.ToDbCommand();

            Assert.Equal(Timeout, dbCommand.CommandTimeout);
        }
コード例 #3
0
        public void QueryCommand_Should_Respect_CommandType_When_Creating_DbCommands()
        {
            var          provider = ProviderFactory.GetProvider("Northwind");
            QueryCommand q        = new QueryCommand("SELECT * FROM Orders", provider);

            q.CommandType = CommandType.StoredProcedure;

            var dbCommand = q.ToDbCommand();

            Assert.Equal(CommandType.StoredProcedure, dbCommand.CommandType);
        }
コード例 #4
0
        public void GitHub_Issue149_QueryCommand_Should_Respect_Timeout_When_Creating_DbCommands()
        {
            var          provider = ProviderFactory.GetProvider("Northwind");
            QueryCommand q        = new QueryCommand("SELECT * FROM Orders", provider);

            q.CommandTimeout = Timeout;

            var dbCommand = q.ToDbCommand();

            Assert.Equal(Timeout, dbCommand.CommandTimeout);
        }