diff --git a/SqlServerTest/Demos/Filter.cs b/SqlServerTest/Demos/Filter.cs index a06d142fb..273f6f814 100644 --- a/SqlServerTest/Demos/Filter.cs +++ b/SqlServerTest/Demos/Filter.cs @@ -18,15 +18,22 @@ namespace OrmTest.Demo var db = GetInstance1(); var sql = db.Queryable().ToSql(); + //SELECT [ID],[SchoolId],[Name],[CreateTime] FROM [STudent] WHERE isDelete=0 var sql2 = db.Queryable((f, s) => new object[] { JoinType.Left, f.SchoolId == s.Id }).ToSql(); + //SELECT[f].[ID],[f].[SchoolId],[f].[Name],[f].[CreateTime] + //FROM[STudent] f Left JOIN School s ON([f].[SchoolId] = [s].[Id]) WHERE f.isDelete=0 + //Specify name filter var sql3 = db.Queryable().Filter("query1").ToSql(); + //SELECT [ID],[SchoolId],[Name],[CreateTime] FROM [STudent] WHERE WHERE id>@id AND isDelete=0 + //Specify key filter and disabled global filter string key = "query1"; var sql4 = db.Queryable().Filter(key,true).ToSql(); + //SELECT [ID],[SchoolId],[Name],[CreateTime] FROM [STudent] WHERE WHERE id>@id }