Пример #1
0
        public static ArticleDetail ConvertArticleDetail(ArchiveInSql model)
        {
            if (model != null)
            {
                return model;
            }

            return null;
        }
Пример #2
0
        public static ArchiveInSql ConvertArchiveInSql(ArticleDetail model)
        {
            if (model != null)
            {
                var r = new ArchiveInSql();

                //映射处理
                var map = new TypeMapping<ArticleDetail, ArchiveInSql>();
                map.AutoMap();
                map.CopyLeftToRight(model, r);

                r.TaxonomyId = r.Categorys.Union(r.Tags).Distinct().Select(e => e.Key).ToList();

                return r;
            }

            return null;
        }