Пример #1
0
        public void TestMethod_ExecuteBySqlAndReturnList_T()
        {
            string sql = "SELECT * FROM dbo.B_Users WHERE PK <> @PK";
            BaseBLL <UserTestEntity> bll = new BaseBLL <UserTestEntity>();

            IEnumerable <UserTestEntity> userEntities = bll.ExecuteBySqlAndReturnList <UserTestEntity>(sql, new { PK = 0 });

            Assert.IsTrue(userEntities.Any());

            Console.WriteLine("获取到{0}条记录。", userEntities.Count());
        }