public List<PostLike> Get(int postId)
{
var postLikes = new List<PostLike>();
try
{
var db = _postLikeRepository.Find(a => a.PostId == postId, true).ToList();
db.ForEach(a => postLikes.Add(PostLikeMapper.ToDto(a)));
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
return postLikes;
}