Пример #1
0
        public static tMessage ToEntity(ViewtMessage model)
        {
            tMessage item = new tMessage();

            item.ID         = model.ID;
            item.ToUid      = model.ToUid;
            item.sContent   = model.sContent;
            item.CreateDate = model.CreateDate;
            item.FromUid    = model.FromUid;
            item.iZan       = model.iZan;
            item.iAudio     = model.iAudio;
            item.ToType     = model.ToType;
            item.FormType   = model.FormType;
            item.ParentID   = model.ParentID;
            item.photo      = model.photo;
            item.Toid       = model.Toid;
            item.loginType  = model.loginType;
            return(item);
        }
Пример #2
0
        public static ViewtMessage ToViewModel(tMessage model)
        {
            if (model == null)
            {
                return(null);
            }

            ViewtMessage item = new ViewtMessage();

            item.ID         = model.ID;
            item.ToUid      = model.ToUid;
            item.sContent   = model.sContent;
            item.CreateDate = model.CreateDate;
            item.FromUid    = model.FromUid;
            item.iZan       = model.iZan;
            item.iAudio     = model.iAudio;
            item.ToType     = model.ToType;
            item.FormType   = model.FormType;
            item.ParentID   = model.ParentID;
            item.photo      = model.photo;
            item.Toid       = model.Toid;
            item.loginType  = model.loginType;
            return(item);
        }