internal static SearchCriteriaVm MapToSearchCriteriaVm(this SearchCriteria criteria, SearchType searchType)
        {
            SearchCriteriaVm searchCriteriaVm = criteria.MapToSearchCriteriaVm();

            searchCriteriaVm.SearchType(searchType);
            return(searchCriteriaVm);
        }
        private static SearchCriteriaVm GetInitSearchCriteriaVm()
        {
            SearchCriteriaVm searchCriteriaVm = new SearchCriteriaVm();

            searchCriteriaVm.SearchType(SearchType.SeniorHousingAndCare);
            searchCriteriaVm.CountryCode("USA");
            return(searchCriteriaVm);
        }
        internal static SearchCriteriaVm MapToSearchCriteriaVm(this AddressVm addressVm, SearchType searchType)
        {
            SearchCriteriaVm searchCriteriaVm = new SearchCriteriaVm();

            searchCriteriaVm.SearchType(searchType);
            searchCriteriaVm.CountryCode(addressVm.CountryCode);
            searchCriteriaVm.StateCode(addressVm.StateCode);
            searchCriteriaVm.City(addressVm.City);
            return(searchCriteriaVm);
        }
        private static List <LinkVm> GetBreadcrumbs(SearchVm searchVm)
        {
            List <LinkVm> list = new List <LinkVm>();

            list.Add(new LinkVm("Home", MslcUrlBuilder.BaseUrl));
            if (searchVm.PageType.IsStaticPage())
            {
                if (searchVm.Seo != null)
                {
                    list.Add(new LinkVm(searchVm.Seo.Header, searchVm.Seo.CanonicalUrl));
                }
                return(list);
            }
            if (searchVm.Criteria.Validate())
            {
                SearchCriteriaVm criteria = new SearchCriteriaVm();
                criteria.SearchType(searchVm.Criteria.SearchType());
                list.Add(new LinkVm(criteria.SearchType().GetEnumLocalizedValue(), MslcUrlBuilder.SearchUrl(criteria, criteria.SearchType())));
                if (!searchVm.Criteria.StateCode().IsNullOrEmpty())
                {
                    criteria.StateCode(searchVm.Criteria.StateCode());
                    list.Add(new LinkVm(LocationBc.Instance.GetStateName(criteria.StateCode()), MslcUrlBuilder.SearchUrl(criteria, criteria.SearchType())));
                }
                if (!searchVm.Criteria.City().IsNullOrEmpty())
                {
                    criteria.City(searchVm.Criteria.City());
                    list.Add(new LinkVm(criteria.City(), MslcUrlBuilder.SearchUrl(criteria, criteria.SearchType())));
                }
                else if (!searchVm.Criteria.Zip().IsNullOrEmpty())
                {
                    criteria.Zip(searchVm.Criteria.Zip());
                    list.Add(new LinkVm(criteria.Zip(), MslcUrlBuilder.SearchUrl(criteria, criteria.SearchType())));
                }
            }
            return(list);
        }