public static ViewYogaArticle ToViewModel(YogaArticle model) { if (model == null) { return(null); } ViewYogaArticle item = new ViewYogaArticle(); item.ID = model.ID; item.ClassID = model.ClassID; item.ArticleTitle = model.ArticleTitle; item.ArticleCon = model.ArticleCon; item.CheckID = model.CheckID; item.IsCheck = model.IsCheck; item.Uid = model.Uid; item.Author = model.Author; item.Creator = model.Creator; item.CreateTime = model.CreateTime; item.IsDelete = model.IsDelete; item.IsPicture = model.IsPicture; item.PicPath = model.PicPath; return(item); }
public static YogaArticle ToEntity(ViewYogaArticle model) { YogaArticle item = new YogaArticle(); item.ID = model.ID; item.ClassID = model.ClassID; item.ArticleTitle = model.ArticleTitle; item.ArticleCon = model.ArticleCon; item.CheckID = model.CheckID; item.IsCheck = model.IsCheck; item.Uid = model.Uid; item.Author = model.Author; item.Creator = model.Creator; item.CreateTime = model.CreateTime; item.IsDelete = model.IsDelete; item.IsPicture = model.IsPicture; item.PicPath = model.PicPath; return(item); }