Beispiel #1
0
        public List <CommentDTO> GetComments(int id)
        {
            var comments = _context.Comments
                           .Where(c => c.ToothId.Equals(id))
                           .OrderByDescending(c => c.Created)
                           .Include(u => u.User)
                           .Select(c => CommentMapper.CommentToDTO(c))
                           .ToList();

            return(comments);
        }