public void TesBuildExpression() { var options = new SearchOptions <User> (new PageParameter { SearchKey = "2" }); options.ContainsFor(u => u.UserName) .StartsFor(u => u.DepName) .EndsFor(u => u.DepName); var exp = options.BuildExpression(); output.WriteLine(exp.ToString()); Assert.NotNull(exp); var query = TestDbContext.UseSqlite().Users.Where(exp); Assert.NotEmpty(query); output.WriteLine(query.ToQueryString()); }