Blog.Logic.Core.PostsLogic.GetPostsForUser C# (CSharp) Method

GetPostsForUser() public method

public GetPostsForUser ( int userId, int threshold = 5, int skip = 10 ) : List
userId int
threshold int
skip int
return List
        public List<Post> GetPostsForUser(int userId, int threshold = 5, int skip = 10)
        {
            var posts = new List<Post>();
            try
            {
                var db = _postRepository.GetPostsForUser(userId, threshold, skip).ToList();
                db.ForEach(a => posts.Add(PostMapper.ToDto(a)));
                posts.ForEach(a => GetPostProperties(a));
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
            return posts;
        }