Exemple #1
0
        public FeedComment GetFeedComment(long commentId)
        {
            var list = dbManager
                       .ExecuteList(GetFeedCommentQuery(Exp.Eq("Id", commentId)))
                       .ConvertAll(r => Mappers.ToFeedComment(r));

            return(0 < list.Count ? list[0] : null);
        }
Exemple #2
0
        public List <FeedComment> GetCommentsByDate(DateTime from, DateTime to)
        {
            var query = new SqlQuery("events_comment")
                        .SelectAll()
                        .Where(Exp.Between("Date", from, to) & Exp.Eq("Tenant", tenant))
                        .OrderBy("Date", true);

            return(dbManager.ExecuteList(query).Select(x => Mappers.ToFeedComment(x)).ToList());
        }
Exemple #3
0
 public List <FeedComment> GetFeedComments(long feedId)
 {
     return(dbManager
            .ExecuteList(GetFeedCommentQuery(Exp.Eq("Feed", feedId)))
            .ConvertAll(r => Mappers.ToFeedComment(r)));
 }