Blog.Logic.ObjectMapper.PostContentMapper.ToEntity C# (CSharp) Method

ToEntity() public static method

public static ToEntity ( PostContent postContent ) : PostContent
postContent PostContent
return Blog.DataAccess.Database.Entities.Objects.PostContent
        public static Db.PostContent ToEntity(PostContent postContent)
        {
            return postContent == null ? null : 
                new Db.PostContent
                {
                    PostContentId = postContent.Id,
                    PostId = postContent.PostId,
                    Media = null,
                    PostContentText = postContent.PostContentText,
                    PostContentTitle = postContent.PostContentTitle,
                    MediaId = postContent.Media == null ? 0 : postContent.Media.Id,
                    CreatedBy = postContent.CreatedBy,
                    CreatedDate = postContent.CreatedDate,
                    ModifiedBy = postContent.ModifiedBy,
                    ModifiedDate = postContent.ModifiedDate
                };
        }
    }
PostContentMapper