コード例 #1
0
        public static moduleModel.Category ToModuleModel(this webModel.Category category)
        {
            var retVal = new moduleModel.Category();

            retVal.InjectFrom(category);

            return(retVal);
        }
コード例 #2
0
        public static webModel.Category ToWebModel(this moduleModel.Category category)
        {
            var retVal = new webModel.Category();
            retVal.InjectFrom(category);

            if (category.Parents != null && category.Parents.Any())
            {
                //retVal.Parents = category.Parents.Select(x => x.ToWebModel(keywords != null ? keywords.Where(k => k.KeywordValue == x.Id) : null));
                retVal.Parents = category.Parents.Select(x => x.ToWebModel());
            }

            if (category.SeoInfos != null)
            {
                retVal.Seo = category.SeoInfos.Select(x => x.ToWebModel());
            }

            return retVal;
        }
コード例 #3
0
        public static webModel.Category ToWebModel(this moduleModel.Category category)
        {
            var retVal = new webModel.Category();

            retVal.InjectFrom(category);

            if (category.Parents != null && category.Parents.Any())
            {
                //retVal.Parents = category.Parents.Select(x => x.ToWebModel(keywords != null ? keywords.Where(k => k.KeywordValue == x.Id) : null));
                retVal.Parents = category.Parents.Select(x => x.ToWebModel());
            }

            if (category.SeoInfos != null)
            {
                retVal.Seo = category.SeoInfos.Select(x => x.ToWebModel());
            }

            return(retVal);
        }