BloggingSystem.Services.DataMappers.CommentsMapper.ToModel C# (CSharp) Method

ToModel() public static method

public static ToModel ( Comment commentEntity ) : CommentModel
commentEntity BloggingSystem.Models.Comment
return BloggingSystem.DataTransferObjects.CommentModel
        public static CommentModel ToModel(Comment commentEntity)
        {
            CommentModel commentModel = new CommentModel()
            {
                Author = commentEntity.Author.DisplayName,
                PostDate = commentEntity.PostDate,
                Text = commentEntity.Text
            };

            return commentModel;
        }
CommentsMapper