Пример #1
0
        //category
        public static ArticleCategoryModel ToModel(this ArticleCategory entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new ArticleCategoryModel
            {
                Id                = entity.Id,
                Name              = entity.GetLocalized(x => x.Name),
                FullName          = entity.GetLocalized(x => x.FullName),
                Description       = entity.GetLocalized(x => x.Description),
                BottomDescription = entity.GetLocalized(x => x.BottomDescription),
                MetaKeywords      = entity.GetLocalized(x => x.MetaKeywords),
                MetaDescription   = entity.GetLocalized(x => x.MetaDescription),
                MetaTitle         = entity.GetLocalized(x => x.MetaTitle),
                SeName            = entity.GetSeName(),
            };

            return(model);
        }