Exemplo n.º 1
0
 public int GetPostsCount(PostsQuery query)
 {
     if (query.SearchText != null)
     {
         return(SearchPostsCount(query.SearchText));
     }
     return
         (_storage.GetPostDao()
          .GetCount(
              null,
              null,
              query.UserId,
              query.Tag));
 }
Exemplo n.º 2
0
        public List <Post> SelectPosts(PostsQuery query)
        {
            if (query.SearchText != null)
            {
                return(SearchPosts(query.SearchText, new PagingQuery(query)));
            }

            return
                (_storage.GetPostDao()
                 .Select(
                     null,
                     null,
                     query.UserId,
                     query.Tag,
                     query.WithContent,
                     false,
                     query.Offset,
                     query.Count,
                     query.WithTags,
                     false));
        }
Exemplo n.º 3
0
 public PagingQuery(PostsQuery q)
 {
     Count  = q.Count;
     Offset = q.Offset;
 }