コード例 #1
0
 public ITypeSearch<EpiFindNotice> CreateQuery(NoticesSearchOptions options)
 {
     SearchOptions = options;
     GetFilter = new FilterBuilder<EpiFindNotice>(_client);
     Query = _client.Search<EpiFindNotice>();
     return Query;
 }
コード例 #2
0
 public ITypeSearch<EpiFindNotice> ApplyOrdering(ITypeSearch<EpiFindNotice> source, NoticesSearchOptions.SortOptions sortOptions)
 {
     switch (sortOptions)
     {
         case NoticesSearchOptions.SortOptions.Surname:
             return source.OrderBy(x => x.Surname);
         case NoticesSearchOptions.SortOptions.DateOfDeath:
             return source.OrderByDescending(x => x.DateOfDeath);
     }
     return source;
 }