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

            UserTestEntity userEntities = bll.ExecuteBySqlAndReturnObject <UserTestEntity>(sql, new { PK = 1 });

            Assert.IsTrue(userEntities != null);

            Console.WriteLine("获取到记录,JSON:{0}", userEntities.TryToJson());
        }