public List<Comment> SearchComments(string query, int threshold = 10, int skip = 10)
{
var comments = new List<Comment>();
try
{
var db = _commentRepository.SearchComments(query, threshold, skip).ToList();
db.ForEach(a => comments.Add(CommentMapper.ToDto(a)));
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
return comments;
}