public static UserReplyModel replyEntityToModel(tbl_reply entity) { UserReplyModel model = new UserReplyModel(); model.postsId = entity.postsID; model.replyId = entity.replyID; model.replyContent = entity.replyContent; model.replyDate = entity.replyDate.GetValueOrDefault(); model.userId = entity.replyMaker; model.replyStatus = entity.replyStatus ?? 0; return(model); }
public static tbl_reply replyModelToEntity(UserReplyModel model) { tbl_reply entity = new tbl_reply(); entity.postsID = model.postsId; entity.replyContent = model.replyContent; entity.replyDate = model.replyDate; entity.replyID = model.replyId; entity.replyLoved = 0; entity.replyMaker = model.userId; entity.replyStatus = model.replyStatus; return(entity); }