public void Can_select_sub_expression_when_called_within_a_datamodel()
        {
            using (var db = OpenDbConnection())
            {
                RecreateAnyObjectTables(db);

                var model = new AnyObjectClass {
                    db = db
                };
                var result = model.CustomProperty;

                result.PrintDump();
                db.GetLastSql().PrintDump();
                Assert.That(db.GetLastSql().NormalizeSql(), Does.Contain("is null"));

                model = new AnyObjectClass {
                    db = db, Identity = Guid.Parse("104ECE6A-7117-4205-961C-126AD276565C")
                };
                result = model.CustomProperty;

                result.PrintDump();
                db.GetLastSql().PrintDump();
                Assert.That(db.GetLastSql().NormalizeSql(), Does.Contain("@"));
            }
        }
コード例 #2
0
        public void Can_select_sub_expression_when_called_within_a_datamodel()
        {
            using (var db = OpenDbConnection())
            {
                RecreateAnyObjectTables(db);

                var model = new AnyObjectClass {
                    db = db
                };
                var result = model.CustomProperty;

                db.GetLastSql().Print();

                result.PrintDump();
            }
        }
        public void Can_select_sub_expression_when_called_within_a_datamodel()
        {
            using (var db = OpenDbConnection())
            {
                RecreateAnyObjectTables(db);

                var model = new AnyObjectClass { db = db };
                var result = model.CustomProperty;

                db.GetLastSql().Print();

                result.PrintDump();
            }
        }