Esempio n. 1
0
        public void NullParameterTest()
        {
            Insert();
            var comm = new DbCommandUtil("SELECT * FROM TEST WHERE ID = @ID");

            Assert.Equal(ConnectionState.Closed, comm.DaScopeContext.Connection.State);
            comm.AddParameter("@ID", DbType.Int32, null);
            Assert.Equal(0, comm.GetDataTable().Rows.Count);
            comm.SetParameterValue("@ID", 0);
            Assert.Equal(0, comm.GetDataTable().Rows.Count);
        }