Esempio n. 1
0
        public int GetTotalReferences()
        {
            int          count  = 0;
            List <Label> labels = LabelDao.GetAllElements();

            foreach (Label l in labels)
            {
                count += l.commentsNum;
            }
            return(count);
        }
Esempio n. 2
0
        public ICollection <LabelDto> GetLabelsDtos()
        {
            ICollection <Label>    labels    = LabelDao.GetAllElements();
            ICollection <LabelDto> labelsDto = new List <LabelDto>();

            foreach (Label l in labels)
            {
                ICollection <CommentDto> commentsDto = new List <CommentDto>();
                foreach (Comment c in l.Comments)
                {
                    commentsDto.Add(new CommentDto(c, c.Event.eventId));
                }
                labelsDto.Add(new LabelDto(l.labelId, l.name, l.commentsNum, commentsDto));
            }
            return(labelsDto);
        }
Esempio n. 3
0
 public ICollection <Label> GetAllLabels()
 {
     return(LabelDao.GetAllElements());
 }
Esempio n. 4
0
 public int GetNumberOfLabels()
 {
     return(LabelDao.GetAllElements().Count);
 }