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

ToEntity() public static method

public static ToEntity ( CommentModel commentModel, User author ) : Comment
commentModel BloggingSystem.DataTransferObjects.CommentModel
author BloggingSystem.Models.User
return BloggingSystem.Models.Comment
        public static Comment ToEntity(CommentModel commentModel, User author)
        {
            Comment commentEntity = new Comment()
            {
                Author = author,
                PostDate = DateTime.Now,
                Text = commentModel.Text
            };

            return commentEntity;
        }
    }
CommentsMapper