public int GetTotalReferences() { int count = 0; List <Label> labels = LabelDao.GetAllElements(); foreach (Label l in labels) { count += l.commentsNum; } return(count); }
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); }
public ICollection <Label> GetAllLabels() { return(LabelDao.GetAllElements()); }
public int GetNumberOfLabels() { return(LabelDao.GetAllElements().Count); }