コード例 #1
0
        public void ExistsByDataReader()
        {
            Assert.IsTrue(NorthwindAdoRepository.ExistsBySqlString("SELECT TOP 1 * FROM Customers"));
            Assert.IsFalse(NorthwindAdoRepository.ExistsBySqlString("SELECT TOP 0 * FROM Customers"));

            Assert.IsFalse(
                NorthwindAdoRepository.ExistsBySqlString("SELECT * FROM Customers WHERE CustomerID=@CustomerID",
                                                         new AdoParameter("CustomerID", "DEBOP68")));

            Assert.IsTrue(NorthwindAdoRepository.ExistsBySqlString("SELECT TOP 1 * FROM [Order Details]"));
            Assert.IsTrue(NorthwindAdoRepository.ExistsByProcedure(GetCustomerOrderHistorySql, CustomerTestParameter));
        }