public static tWriteLog ToEntity(ViewtWriteLog model) { tWriteLog item = new tWriteLog(); item.ID = model.ID; item.Uid = model.Uid; item.sTitle = model.sTitle; item.sContent = model.sContent; item.ifShow = model.ifShow; item.CreateDate = model.CreateDate; item.iReadNums = model.iReadNums; item.ifpush = model.ifpush; item.ValueType = model.ValueType; return(item); }
public static ViewtWriteLog ToViewModel(tWriteLog model) { if (model == null) { return(null); } ViewtWriteLog item = new ViewtWriteLog(); item.ID = model.ID; item.Uid = model.Uid; item.sTitle = model.sTitle; item.sContent = model.sContent; item.ifShow = model.ifShow; item.CreateDate = model.CreateDate; item.iReadNums = model.iReadNums; item.ifpush = model.ifpush; item.ValueType = model.ValueType; return(item); }