Blog.Logic.Core.CommentLikesLogic.Get C# (CSharp) 메소드

Get() 공개 메소드

public Get ( int commentId ) : List
commentId int
리턴 List
        public List<CommentLike> Get(int commentId)
        {
            var commentLikes = new List<CommentLike>();
            try
            {
                var db = _commentLikeRepository.Find(a => a.CommentId == commentId, true).ToList();
                db.ForEach(a => commentLikes.Add(CommentLikeMapper.ToDto(a)));
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
            return commentLikes;
        }