Example #1
0
        public IHttpActionResult Search([ModelBinder(typeof(MarketingSearchCriteriaBinder))] coreModel.MarketingSearchCriteria criteria)
        {
            var retVal     = new webModel.MarketingSearchResult();
            var coreResult = _marketingSearchService.SearchResources(criteria);

            retVal.Promotions          = coreResult.Promotions.Select(x => x.ToWebModel()).ToList();
            retVal.ContentPlaces       = coreResult.ContentPlaces.Select(x => x.ToWebModel()).ToList();
            retVal.ContentItems        = coreResult.ContentItems.Select(x => x.ToWebModel()).ToList();
            retVal.ContentPublications = coreResult.ContentPublications.Select(x => x.ToWebModel()).ToList();
            retVal.ContentFolders      = coreResult.ContentFolders.Select(x => x.ToWebModel()).ToList();
            retVal.TotalCount          = coreResult.TotalCount;
            return(Ok(retVal));
        }
		public IHttpActionResult Search([ModelBinder(typeof(MarketingSearchCriteriaBinder))] coreModel.MarketingSearchCriteria criteria)
		{
			var retVal = new webModel.MarketingSearchResult();
			var coreResult = _marketingSearchService.SearchResources(criteria);

			retVal.Promotions = coreResult.Promotions.Select(x => x.ToWebModel()).ToList();
			retVal.ContentPlaces = coreResult.ContentPlaces.Select(x => x.ToWebModel()).ToList();
			retVal.ContentItems = coreResult.ContentItems.Select(x => x.ToWebModel()).ToList();
			retVal.ContentPublications = coreResult.ContentPublications.Select(x => x.ToWebModel()).ToList();
			retVal.ContentFolders = coreResult.ContentFolders.Select(x => x.ToWebModel()).ToList();
			retVal.TotalCount = coreResult.TotalCount;
			return Ok(retVal);
		}