Ejemplo n.º 1
0
        protected override async Task <ICommandResult> Handle(DescriptionCommand command)
        {
            DescriptionCommandResult DescriptionCommandResult = new DescriptionCommandResult();

            if (!command.IsStateDescription && !command.IsCityDescription)
            {
                var countryDescription = _countryDescriptionRepository.GetByCountryId(command.Country.Id);
                if (countryDescription != null)
                {
                    countryDescription.Description = command.Description;
                    _countryDescriptionRepository.Save(countryDescription);
                }
                else
                {
                    var countryDesc = new CountryDescription
                    {
                        CountryId   = command.Country.Id,
                        Description = command.Description,
                        CreatedBy   = command.CreatedBy,
                        ModifiedBy  = command.CreatedBy,
                        CreatedUtc  = DateTime.UtcNow,
                        IsEnabled   = true,
                        UpdatedBy   = command.CreatedBy,
                        UpdatedUtc  = DateTime.UtcNow
                    };
                    _countryDescriptionRepository.Save(countryDesc);
                }
            }
            else if (!command.IsCountryDescription && !command.IsStateDescription)
            {
                var cityDescription = _cityDescriptionRepository.GetBycityId(command.City.Id);
                if (cityDescription != null)
                {
                    cityDescription.Description = command.Description;
                    cityDescription.UpdatedUtc  = DateTime.UtcNow;
                    cityDescription.ModifiedBy  = command.CreatedBy;
                    _cityDescriptionRepository.Save(cityDescription);
                }
                else
                {
                    var cityDesc = new CityDescription
                    {
                        CityId      = command.City.Id,
                        Description = command.Description,
                        CreatedBy   = command.CreatedBy,
                        ModifiedBy  = command.CreatedBy,
                        CreatedUtc  = DateTime.UtcNow,
                        IsEnabled   = true,
                        UpdatedBy   = command.CreatedBy,
                        UpdatedUtc  = DateTime.UtcNow
                    };
                    _cityDescriptionRepository.Save(cityDesc);
                }
            }
            else
            {
                var stateDescription = new StateDescription
                {
                    StateId     = command.StateId,
                    Description = command.Description,
                    CreatedBy   = command.CreatedBy,
                    ModifiedBy  = command.CreatedBy,
                    CreatedUtc  = DateTime.UtcNow,
                    IsEnabled   = true,
                    UpdatedBy   = command.CreatedBy,
                    UpdatedUtc  = DateTime.UtcNow
                };
                _stateDescriptionRepository.Save(stateDescription);
            }
            return(DescriptionCommandResult);
        }
Ejemplo n.º 2
0
        public FeelUserJourneyQueryResult Handle(FeelUserJourneyQuery query)
        {
            try
            {
                var isCategoryLevel     = query.CategoryId != 0;
                var isSubcategoryLevel  = query.SubCategoryId != 0;
                var isCountryLevel      = query.CountryId != 0;
                var isStateLevel        = query.StateId != 0;
                var isCityLevel         = query.CityId != 0;
                var isOnlineExperiences = false;
                var EventCategory       = query.MasterEventType == Contracts.Enums.MasterEventType.Online ? _eventCategory.GetAll().Where(s => s.MasterEventTypeId == Contracts.Enums.MasterEventType.Online).FirstOrDefault() : _eventCategory.Get(query.CategoryId);
                var allCategories       = new List <FIL.Contracts.DataModels.EventCategory>();
                if (EventCategory == null && query.PageType == Contracts.Enums.PageType.Category)
                {
                    return(new FeelUserJourneyQueryResult {
                    });
                }
                if (!isCountryLevel && query.PageType == Contracts.Enums.PageType.Country)
                {
                    return(new FeelUserJourneyQueryResult {
                    });
                }
                if (isCountryLevel && query.PageType == Contracts.Enums.PageType.Country)
                {
                    if (isCategoryLevel && query.CategoryId == 0) // If Global country/state/city page
                    {
                        isCategoryLevel = false;
                    }
                    if (isSubcategoryLevel && query.SubCategoryId == 0) // If Global country/state/city page
                    {
                        isSubcategoryLevel = false;
                    }
                    var country = _countryRepository.Get(query.CountryId);
                    if (country == null)
                    {
                        return(new FeelUserJourneyQueryResult {
                        });
                    }
                }
                var subCategories = _eventCategory.GetByEventCategoryId(query.CategoryId).Where(s => s.IsEnabled).ToList();
                if (query.MasterEventType == Contracts.Enums.MasterEventType.Online || query.MasterEventType == Contracts.Enums.MasterEventType.InRealLife)
                {
                    isOnlineExperiences = query.MasterEventType == Contracts.Enums.MasterEventType.Online ? true : false;
                    allCategories       = _eventCategory.GetAll().ToList();
                    var parentCategoryIds = allCategories.Where(s => s.MasterEventTypeId == query.MasterEventType).Select(s => s.Id);
                    subCategories = allCategories.Where(s => parentCategoryIds.Any(p => p == s.EventCategoryId)).ToList();
                }
                if (isSubcategoryLevel)
                {
                    subCategories = subCategories.Where(s => s.Id == query.SubCategoryId).ToList();
                }
                var firstEventCategory = _eventCategory.Get(subCategories.FirstOrDefault().EventCategoryId);
                if (firstEventCategory != null && (!isCountryLevel && !isStateLevel && !isCategoryLevel && !isCityLevel && !isSubcategoryLevel))
                {
                    isOnlineExperiences = firstEventCategory.MasterEventTypeId == Contracts.Enums.MasterEventType.Online ? true : false;
                }
                var placeDetails = _placeProvider.GetAllPlaces(query, subCategories, EventCategory, query.MasterEventType, isCountryLevel, isStateLevel, isCityLevel).Where(s => s.CurrencyId != 0 && !s.IsTokenize).ToList();
                if (!placeDetails.Any())
                {
                    return(new FeelUserJourneyQueryResult {
                    });
                }
                var pageDetail = new PageDetail
                {
                    PageType           = query.PageType,
                    PagePath           = query.PagePath,
                    IsCategoryLevel    = isCategoryLevel,
                    IsSubCategoryLevel = isSubcategoryLevel,
                    IsCountryLevel     = isCountryLevel,
                    IsStateLevel       = isStateLevel,
                    IsCityLevel        = isCityLevel
                };
                List <DynamicPlaceSections> DynamicPlaceSections = new List <DynamicPlaceSections>();
                CountryPageDetail           countryPageDetail    = new CountryPageDetail();
                DynamicPlaceSections        AllplaceTiles        = new DynamicPlaceSections();
                List <GeoLocation>          Cities           = new List <GeoLocation>();
                List <GeoLocation>          States           = new List <GeoLocation>();
                List <GeoLocation>          Countries        = new List <GeoLocation>();
                List <SubCategory>          allSubCategories = new List <SubCategory>();

                if (((!isCityLevel || isCategoryLevel) && query.PageType == Contracts.Enums.PageType.Category) ||
                    (query.PageType == Contracts.Enums.PageType.Country && (!isSubcategoryLevel && !isCityLevel))
                    ) // Get subcat for category => category/country/state OR Country => category/country/state
                {
                    if (query.MasterEventType == Contracts.Enums.MasterEventType.Online || query.MasterEventType == Contracts.Enums.MasterEventType.InRealLife)
                    {
                        subCategories = allCategories.Where(s => s.MasterEventTypeId == query.MasterEventType).ToList();
                    }
                    if (((isCountryLevel || isStateLevel || isCityLevel) && query.PageType == Contracts.Enums.PageType.Category) ||
                        ((isStateLevel || isCityLevel || isCountryLevel) && (isCategoryLevel) && query.PageType == Contracts.Enums.PageType.Category)) // filter the subcat if it's category => state/country or country => category page
                    {
                        subCategories = subCategories.Where(x => placeDetails.Any(y => y.EventCategoryId == x.Id)).ToList();
                    }
                    else if (query.PageType == Contracts.Enums.PageType.Country && !isCategoryLevel && !isSubcategoryLevel) // Global country/city/state landing page
                    {
                        subCategories = _eventCategory.GetByIds(placeDetails.Select(s => s.ParentCategoryId).Distinct()).ToList();
                    }
                    allSubCategories = _subCategoryProvider.GetSubCategories(query, placeDetails, subCategories, pageDetail).OrderBy(s => s.Order).ToList();
                }

                if (((!isCityLevel || isCountryLevel) && pageDetail.PageType == Contracts.Enums.PageType.Category) ||
                    (pageDetail.PageType == Contracts.Enums.PageType.Country && !(isSubcategoryLevel && isCityLevel)))
                {
                    var cityGroup  = placeDetails.Select(s => new { s.CityId, s.CityName }).Distinct().Take(10);
                    var stateGroup = placeDetails.Select(s => new { s.StateId, s.StateName }).Distinct().Take(10);
                    // If it's online then don't show city/state/country
                    if (!isOnlineExperiences)
                    {
                        foreach (var group in cityGroup)
                        {
                            GeoLocation city = new GeoLocation();
                            if (group.CityName != "")
                            {
                                Cities.Add(GeoLocation(group.CityName, group.CityId, placeDetails.First().ParentCategorySlug, subCategories.First().Slug, isCategoryLevel, placeDetails.First().ParentCategoryId, subCategories.First().Id, query.CountryId, "city", pageDetail));
                            }
                        }
                        foreach (var group in stateGroup)
                        {
                            GeoLocation state = new GeoLocation();
                            if (group.StateName != "")
                            {
                                States.Add(GeoLocation(group.StateName, group.StateId, placeDetails.First().ParentCategorySlug, subCategories.First().Slug, isCategoryLevel, placeDetails.First().ParentCategoryId, subCategories.First().Id, query.CountryId, "state", pageDetail));
                            }
                        }
                        if (query.PageType == Contracts.Enums.PageType.Category)
                        {
                            var countryGroup = placeDetails.Select(s => new { s.CountryId, s.CountryName }).Distinct().Take(10);
                            foreach (var group in countryGroup)
                            {
                                GeoLocation country = new GeoLocation();
                                if (group.CountryName != "")
                                {
                                    Countries.Add(GeoLocation(group.CountryName, group.CountryId, placeDetails.First().ParentCategorySlug, subCategories.First().Slug, isCategoryLevel, placeDetails.First().ParentCategoryId, subCategories.First().Id, query.CountryId, "country", pageDetail));
                                }
                            }
                        }
                    }
                    DynamicPlaceSections = _dynamicSectionProvider.GetDynamicSections(placeDetails, query.MasterEventType, pageDetail);
                }

                AllplaceTiles.PlaceDetails   = placeDetails.Take(320).ToList();
                AllplaceTiles.SectionDetails = new SectionDetail();
                if (query.MasterEventType == Contracts.Enums.MasterEventType.Online || query.MasterEventType == Contracts.Enums.MasterEventType.InRealLife)
                {
                    AllplaceTiles.SectionDetails.Heading = query.MasterEventType == Contracts.Enums.MasterEventType.Online ? "Top Online Experiences from around the World" :
                                                           "In-Real-Life experiences around the world";
                }
                else if (query.PageType == Contracts.Enums.PageType.Category)
                {
                    AllplaceTiles.SectionDetails.Heading = (isCategoryLevel ? EventCategory.DisplayName : subCategories.First().DisplayName) + (isOnlineExperiences ? " from around " : " around ") +
                                                           (isCountryLevel ? placeDetails.First().CountryName : isStateLevel ?
                                                            placeDetails.First().StateName : isCityLevel ? placeDetails.First().CityName : "the World");
                }
                else if (query.PageType == Contracts.Enums.PageType.Country)
                {
                    AllplaceTiles.SectionDetails.Heading = ((!pageDetail.IsCategoryLevel && !pageDetail.IsSubCategoryLevel) ? "Feels"
                        : pageDetail.IsCategoryLevel
                        ? placeDetails.First().ParentCategory
                        : pageDetail.IsSubCategoryLevel ? placeDetails.First().Category : "") + (isOnlineExperiences ? " from around " : " around ") + (pageDetail.IsCityLevel
                        ? placeDetails.First().CityName :
                                                                                                                                                        pageDetail.IsStateLevel ? placeDetails.First().StateName : placeDetails.First().CountryName);
                }
                AllplaceTiles.SectionDetails.IsShowMore = true;
                var searchValue = "";
                if (query.MasterEventType == Contracts.Enums.MasterEventType.Online || query.MasterEventType == Contracts.Enums.MasterEventType.InRealLife)
                {
                    searchValue = "";
                }
                else if (query.PageType == Contracts.Enums.PageType.Category)
                {
                    searchValue = placeDetails.First().ParentCategory + (isSubcategoryLevel ? ", " + placeDetails.First().Category : "") +
                                  (isCountryLevel ? ", " + placeDetails.First().CountryName : "") + (isStateLevel ? ", " + placeDetails.First().StateName : "") +
                                  (isCityLevel ? ", " + placeDetails.First().CityName : "");
                }
                else
                {
                    searchValue = placeDetails.First().CountryName + (isSubcategoryLevel ? ", " + placeDetails.First().Category : "" + (isCategoryLevel ? ", " + placeDetails.First().ParentCategory : "")) +
                                  (isStateLevel ? ", " + placeDetails.First().StateName : "") +
                                  (isCityLevel ? ", " + placeDetails.First().CityName : "");
                }
                if (query.PageType == Contracts.Enums.PageType.Country)
                {
                    DynamicPlaceSections = DynamicPlaceSections.OrderBy(a => Guid.NewGuid()).ToList();
                    var description = "";
                    if (pageDetail.IsCityLevel)
                    {
                        var cityDescription = _cityDescriptionRepository.GetBycityId(placeDetails.First().CityId);
                        description = cityDescription != null ? cityDescription.Description : "";
                    }
                    else if (pageDetail.IsStateLevel)
                    {
                        var stateDescription = _stateDescriptionRepository.GetByStateId(placeDetails.First().StateId);
                        description = stateDescription != null ? stateDescription.Description : "";
                    }
                    else
                    {
                        var countryDescription = _countryDescriptionRepository.GetByCountryId(query.CountryId);
                        description = countryDescription != null ? countryDescription.Description : "";
                    }
                    countryPageDetail.Count        = (pageDetail.IsCountryLevel && !pageDetail.IsStateLevel && !pageDetail.IsCityLevel) ? _countryRepository.GetAllCountryPlace().Where(s => s.Id == query.CountryId).FirstOrDefault().Count : placeDetails.GroupBy(x => x.Name, (key, group) => group.First()).Count();
                    countryPageDetail.Description  = description;
                    countryPageDetail.SectionTitle = pageDetail.IsCityLevel ? placeDetails.First().CityName : isStateLevel?placeDetails.First().StateName:
                                                     placeDetails.First().CountryName;
                }

                return(new FeelUserJourneyQueryResult
                {
                    AllPlaceTiles = AllplaceTiles,
                    SubCategories = allSubCategories,
                    GeoData = new GeoData {
                        Cities = Cities, Countries = Countries, States = States
                    },
                    DynamicPlaceSections = DynamicPlaceSections,
                    SearchValue = searchValue,
                    ContryPageDetails = countryPageDetail,
                    Success = true
                });
            }
            catch (Exception e)
            {
                _logger.Log(LogCategory.Error, new Exception("", e));
                return(new FeelUserJourneyQueryResult
                {
                });
            }
        }
Ejemplo n.º 3
0
        public FeelCategoryEventQueryResult Handle(FeelCategoryEventQuery query)
        {
            try
            {
                query.SiteId = FIL.Contracts.Enums.Site.feelaplaceSite;
                var countryDescription = new FIL.Contracts.DataModels.CountryDescription();
                var cityDescription    = new FIL.Contracts.DataModels.CityDescription();
                var countryContents    = new List <FIL.Contracts.DataModels.CountryContentMapping>();
                var indexEventId       = eventIdProvider(query);
                var siteEvents         = _eventSiteIdMappingRepository
                                         .GetBySiteId(query.SiteId)
                                         .OrderBy(o => o.SortOrder).ToList();
                var categoryEvents = _eventRepository.GetByAllEventIds(indexEventId)
                                     .Where(e => e.IsEnabled)
                                     .ToList();

                var eventMapping = categoryEvents.ToDictionary(e => e.Id);

                var eventIds = eventMapping.Keys;
                var eventCategoryMappings = _eventCategoryMappingRepository.GetByEventIds(eventIds).Where(ed => ed.IsEnabled == true);
                var allEventDetails       = _eventDetailRepository.GetByEventIds(eventIds).Where(ed => ed.IsEnabled == true);
                var allEventAttributes    = _eventAttributeRepository.GetByEventDetailIds(allEventDetails.Select(s => s.Id));
                var allEventTicketDetails = _eventTicketDetailRepository.GetAllByEventDetailIds(allEventDetails.Select(s => s.Id));
                var allEventTicketDetailTicketCategoryTypeMapping = _eventTicketDetailTicketCategoryTypeMappingRepository.GetByEventTicketDetails(allEventTicketDetails.Select(s => s.Id).ToList()).Where(s => s.TicketCategoryTypeId == 2);
                allEventTicketDetails = allEventTicketDetails.Where(s => allEventTicketDetailTicketCategoryTypeMapping.All(p => p.EventTicketDetailId != s.Id));
                var allLiveEventDetails = _liveEventDetailRepository.GetAllByEventIds(eventIds.ToList());
                var allEventRatings     = _ratingRepository.GetByEventIds(eventIds);
                var venueMapping        = _venueRepository.GetByVenueIds(allEventDetails.Select(ed => ed.VenueId).Distinct())
                                          .ToDictionary(v => v.Id);
                var eventDetailsMapping = allEventDetails.GroupBy(ed => ed.EventId)
                                          .ToDictionary(g => g.Key, g => g.ToList());
                var eventCategoryMapping = eventCategoryMappings.GroupBy(ed => ed.EventId)
                                           .ToDictionary(g => g.Key, g => g.ToList());
                var eventRatingMapping = allEventRatings.GroupBy(ed => ed.EventId)
                                         .ToDictionary(g => g.Key, g => g.ToList());

                var cityIds      = venueMapping.Values.Select(s => s.CityId).Distinct();
                var allCities    = _cityRepository.GetByCityIds(cityIds);
                var cityMapping  = allCities.ToDictionary(c => c.Id);
                var stateId      = cityMapping.Values.Select(c => c.StateId).Distinct();
                var stateMapping = _stateRepository.GetByStateIds(stateId)
                                   .ToDictionary(s => s.Id);
                var countryIdList  = stateMapping.Values.Select(s => s.CountryId).Distinct();
                var countryMapping = _countryRepository.GetByCountryIds(countryIdList)
                                     .ToDictionary(c => c.Id);
                if (query.IsCountryLandingPage)
                {
                    if (countryIdList.ToList().Any())
                    {
                        countryDescription = _countryDescriptionRepository.GetByCountryId(countryIdList.ToList().ElementAt(0));
                        countryContents    = _countryContentMappingRepository.GetByCountryId(countryIdList.ToList().ElementAt(0)).ToList();
                    }
                }
                if (query.IsCityLandingPage)
                {
                    if (cityIds.ToList().Any())
                    {
                        var cities = _cityRepository.GetAllByName(allCities.ElementAt(0).Name);
                        foreach (var currentCity in allCities)
                        {
                            cityDescription = _cityDescriptionRepository.GetBycityId(currentCity.Id);
                            if (cityDescription != null)
                            {
                                break;
                            }
                        }
                    }
                }
                var eventsBySortOrder = new List <FIL.Contracts.DataModels.Event>();
                foreach (var item in siteEvents)
                {
                    var events = categoryEvents.FirstOrDefault(w => w.Id == item.EventId);
                    if (events != null)
                    {
                        eventsBySortOrder.Add(AutoMapper.Mapper.Map <FIL.Contracts.DataModels.Event>(events));
                    }
                }
                eventsBySortOrder = eventsBySortOrder.Where(s => !s.IsTokenize).ToList();
                var CategoryEventData = eventsBySortOrder.Select(ce =>
                {
                    try
                    {
                        var eventObj           = eventMapping[ce.Id];
                        var EventCategory      = eventObj.EventCategoryId.ToString();
                        var parentCategory     = "";
                        var eventDetails       = eventDetailsMapping[ce.Id];
                        var eventAttribute     = allEventAttributes.Where(s => s.EventDetailId == eventDetails.FirstOrDefault().Id).FirstOrDefault();
                        var eventTicketDetails = allEventTicketDetails.Where(s => eventDetails.Exists(p => p.Id == s.EventDetailId));
                        var eventCategoryMap   = eventCategoryMapping[ce.Id];
                        if (eventCategoryMap.Any())
                        {
                            var eventCategory = _eventCategoryRepository.Get(eventCategoryMap.FirstOrDefault().EventCategoryId);
                            if (eventCategory != null)
                            {
                                EventCategory           = eventCategory.Slug;
                                var parentCategoryModel = _eventCategoryRepository.Get(eventCategory.EventCategoryId);
                                parentCategory          = parentCategoryModel.Slug;
                            }
                        }
                        List <FIL.Contracts.DataModels.Rating> eventRatings;
                        if (eventRatingMapping.ContainsKey(ce.Id))
                        {
                            eventRatings = eventRatingMapping[ce.Id];
                        }
                        else
                        {
                            eventRatings = null;
                        }
                        var eventDetailIdList       = eventDetails.Select(s => s.Id).Distinct().ToList();
                        var eventTicketDetailIdList = eventTicketDetails.Select(s => s.Id).Distinct().ToList();
                        var venues    = eventDetails.Select(s => s.VenueId).Distinct().Select(v => venueMapping[v]);
                        var cities    = venues.Select(s => s.CityId).Distinct().Select(c => cityMapping[c]);
                        var states    = cities.Select(s => s.StateId).Distinct().Select(s => stateMapping[s]);
                        var countries = states.Select(s => s.CountryId).Distinct().Select(c => countryMapping[c]);
                        var eventTicketAttributeMapping = new List <Contracts.DataModels.EventTicketAttribute>
                        {
                            _eventTicketAttributeRepository.GetMaxPriceByEventTicketDetailId(eventTicketDetailIdList),
                            _eventTicketAttributeRepository.GetMinPriceByEventTicketDetailId(eventTicketDetailIdList)
                        };
                        var currencyMapping            = _currencyTypeRepository.GetByCurrencyId(eventTicketAttributeMapping.Where(s => s.IsEnabled == true).ToList().First().CurrencyId);
                        List <string> eventCatMappings = new List <string>();
                        var eventCategoryDataModel     = _eventCategoryRepository.GetByIds(eventCategoryMap.Select(s => s.EventCategoryId));
                        foreach (var eventCat in eventCategoryDataModel)
                        {
                            eventCatMappings.Add(eventCat.DisplayName);
                        }
                        var localDateTime = eventDetails.FirstOrDefault().StartDateTime.DayOfWeek + ", " + eventDetails.FirstOrDefault().StartDateTime.ToString(@"MMM dd, yyyy HH:mm", new CultureInfo("en-US")).ToUpper();
                        if (eventAttribute != null)
                        {
                            localDateTime = eventDetails.FirstOrDefault().StartDateTime.DayOfWeek + ", " + _localTimeZoneConvertProvider.ConvertToLocal(eventDetails.FirstOrDefault().StartDateTime, eventAttribute.TimeZone).ToString(@"MMM dd, yyyy HH:mm", new CultureInfo("en-US")).ToUpper();
                        }

                        return(new CategoryEventContainer
                        {
                            CategoryEvent = Mapper.Map <Contracts.Models.CategoryEvent>(ce),
                            EventType = eventObj.EventTypeId.ToString(),
                            EventCategory = EventCategory,
                            City = Mapper.Map <IEnumerable <City> >(cities),
                            State = Mapper.Map <IEnumerable <State> >(states),
                            Country = Mapper.Map <IEnumerable <Country> >(countries),
                            Event = Mapper.Map <Event>(eventObj),
                            EventDetail = Mapper.Map <IEnumerable <EventDetail> >(eventDetails),
                            Rating = Mapper.Map <IEnumerable <Rating> >(eventRatings),
                            CurrencyType = Mapper.Map <CurrencyType>(currencyMapping),
                            Venue = Mapper.Map <IEnumerable <Venue> >(venues),
                            EventTicketAttribute = Mapper.Map <IEnumerable <EventTicketAttribute> >(eventTicketAttributeMapping),
                            EventCategories = eventCatMappings,
                            LocalStartDateTime = localDateTime,
                            TimeZoneAbbrivation = eventAttribute != null ? eventAttribute.TimeZoneAbbreviation : "UTC",
                            EventFrequencyType = eventDetails.FirstOrDefault().EventFrequencyType,
                            ParentCategory = parentCategory,
                            LiveEventDetail = allLiveEventDetails.Where(s => s.EventId == ce.Id).FirstOrDefault()
                        });
                    }
                    catch (Exception e)
                    {
                        return(new CategoryEventContainer
                        {
                        });
                    }
                });

                return(new FeelCategoryEventQueryResult
                {
                    CategoryEvents = CategoryEventData.ToList(),
                    CountryDescription = Mapper.Map <Contracts.Models.CountryDescription>(countryDescription),
                    CityDescription = cityDescription,
                    CountryContentMapping = Mapper.Map <List <CountryContentMapping> >(countryContents)
                });
            }
            catch (Exception e)
            {
                return(new FeelCategoryEventQueryResult
                {
                });
            }
        }