Skip to content

whereexpress如何加括号? #810

Answered by j4587698
j4587698 asked this question in Q&A
Discussion options

You must be logged in to vote

套娃完成,代码如下

IFreeSql fsql = new FreeSql.FreeSqlBuilder()
                .UseConnectionString(FreeSql.DataType.Sqlite, @"Data Source=db1.db")
                .UseAutoSyncStructure(true) //自动同步实体结构到数据库,FreeSql不会扫描程序集,只有CRUD时才会生成表。
                .Build(); //请务必定义成 Singleton 单例模式
            List<Test> tests = new List<Test>()
            {
                new Test() {Name = null},
                new Test() {Name = ""},
                new Test() { Name = "test"}
            };
            fsql.Insert<Test>().AppendData(tests).ExecuteAffrows();
            Expression<Func<Test, bool>> where = x => x.Id > 3;
            Expression<Func<Test, bool>> where1 = x => x.Name == null;
            /…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@j4587698
Comment options

@luoyunchong
Comment options

@j4587698
Comment options

@j4587698
Comment options

Comment options

You must be logged in to vote
1 reply
@luoyunchong
Comment options

Answer selected by j4587698
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants