Ejemplo n.º 1
0
        private static SapphireQueryBuilderBase <DemoEntry> TestInQuery(SapphireQueryBuilder <DemoEntry> queryBuilder, JToken[] parameters)
        {
            List <string> values = parameters[0].ToObject <List <string> >();

            return(queryBuilder
                   .Where(e => values.Contains(e.Content)));
        }
Ejemplo n.º 2
0
 private static SapphireQueryBuilderBase <DemoEntry> OnyTestQuery(SapphireQueryBuilder <DemoEntry> queryBuilder, HttpInformation httpInformation, JToken[] parameters)
 {
     return(queryBuilder
            .Where(e => e.Content.Length > 5)
            .OrderBy(e => e.Content)
            .ThenOrderBy(e => e.IntegerValue)
            .Select(m => new { m.Content }));
 }
 private static SapphireQueryBuilder <ServerSideQueryWithDefault> ByContentQuery(
     SapphireQueryBuilder <ServerSideQueryWithDefault> builder)
 {
     return(builder
            .Where(entry => entry.Content.Length > 5));
 }
Ejemplo n.º 4
0
 private static SapphireQueryBuilder <T> DefaultQuery <T>(SapphireQueryBuilder <T> builder)
     where T : ServerSideQueryWithDefaultBase
 {
     return(builder
            .Where(entry => !entry.Deleted));
 }