Exemplo n.º 1
0
        public static tLearing ToEntity(ViewtLearing model)
        {
            tLearing item = new tLearing();

            item.ID            = model.ID;
            item.Uid           = model.Uid;
            item.sPic          = model.sPic;
            item.CreateDate    = model.CreateDate;
            item.sTitle        = model.sTitle;
            item.iReadNums     = model.iReadNums;
            item.iWritelogNums = model.iWritelogNums;
            item.iZanNums      = model.iZanNums;
            item.iType         = model.iType;
            item.sContent      = model.sContent;
            item.ifexamine     = model.ifexamine;
            item.UrlType       = model.UrlType;
            return(item);
        }
Exemplo n.º 2
0
        public static ViewtLearing ToViewModel(tLearing model)
        {
            if (model == null)
            {
                return(null);
            }

            ViewtLearing item = new ViewtLearing();

            item.ID            = model.ID;
            item.Uid           = model.Uid;
            item.sPic          = model.sPic;
            item.CreateDate    = model.CreateDate;
            item.sTitle        = model.sTitle;
            item.iReadNums     = model.iReadNums;
            item.iWritelogNums = model.iWritelogNums;
            item.iZanNums      = model.iZanNums;
            item.iType         = model.iType;
            item.sContent      = model.sContent;
            item.ifexamine     = model.ifexamine;
            item.UrlType       = model.UrlType;

            return(item);
        }