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

PostCleanUp() public method

public PostCleanUp ( Post post ) : Post
post Blog.Common.Contracts.Post
return Blog.Common.Contracts.Post
        public Post PostCleanUp(Post post)
        {
            post.Tags = post.Tags != null ? PrepareTags(post.Tags) : null;
            post.PostContents = post.PostContents != null ? PreparePostContents(post.PostContents, post.Id) : null;
            post.Communities = post.Communities != null ? PrepareCommunities(post.Communities) : new List<Community>();

            return post;
        }