public void TsQueryAnd() { using (var context = new BloggingContext(ConnectionString)) { context.Database.Log = Console.Out.WriteLine; context.Blogs.Add(new Blog { Name = "_" }); context.SaveChanges(); var result = context.Blogs.Select( x => NpgsqlTextFunctions.QueryAnd( NpgsqlTextFunctions.AsTsQuery("fat | rat"), NpgsqlTextFunctions.AsTsQuery("cat"))).First(); Assert.That( NpgsqlTsQuery.Parse(result).ToString(), Is.EqualTo(NpgsqlTsQuery.Parse("( 'fat' | 'rat' ) & 'cat'").ToString())); } }