Exemplo n.º 1
0
        public static Post Get(this IPostDao pDao, Guid id, bool withTags, bool withCommentsCount)
        {
            var list = pDao.Select(id, null, null, true, withTags, withCommentsCount);

            if (list.Count == 1)
            {
                return(list[0]);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 public static List <Post> GetAllPostsDesc(this IPostDao pDao, int?from, int?count)
 {
     return(pDao.Select(null, null, null, null, true, false, from, count, true, true));
 }
Exemplo n.º 3
0
 public static List <Post> GetUserPostsDesc(this IPostDao pDao, Guid userId, string tag, int?from, int?count)
 {
     return(pDao.Select(null, null, userId, tag, true, false, from, count, true, true));
 }
Exemplo n.º 4
0
 public static List <Post> GetPostsByTagDesc(this IPostDao pDao, string tag, int?from, int?count)
 {
     return(pDao.Select(null, null, null, tag, true, false, from, count, true, true));
 }