人大金仓V8R6 调用 SqlFunc.IsNullOrEmpty 查询为空 返回

SqlSugar
4 151
orm版本:5.0.3.4,最新版本


[SugarTable("TestTable")]
    class TestTable
    {
        [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true, OracleSequenceName = "testtable_id_seq")]
        public int Id { get; set; }

        [SugarColumn(IsNullable = true)]
        public int UserId { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string Title { get; set; }
    }
   
   
   
   var info = new List<TestTable>() { };
            info.Add(new TestTable { Title = "1", UserId = 1 });
            info.Add(new TestTable { Title = "2", UserId = 2 });
            info.Add(new TestTable { Title = "3", UserId = 3 });
            info.Add(new TestTable { Title = "4", UserId = 4 });
            var db = new SqlSugarClient(new ConnectionConfig()
            {
                ConnectionString = constr,
                DbType = SqlSugar.DbType.Kdbndp,
                IsAutoCloseConnection = true,
                InitKeyType = InitKeyType.Attribute,
            });

            db.Insertable(info).ExecuteCommand();

                 var  dataList = db.Queryable<TestTable>()

                  .Where(x => !SqlFunc.IsNullOrEmpty(x.Title)).OrderBy("Id asc")

                  .ToList();


image.png


热忱回答4