示例#1
0
        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);
        }
示例#2
0
        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);
        }