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
};
}
}