private void SearchRequest(SearchRequestEvent searchRequestEvent)
        {
            searchRequestEvent.Search.SearchOptions.OrderBy = "Name";

            this.entityService.ExecuteAsyncSearch<Location>(
                this.search = searchRequestEvent.Search,
                response =>
                    {
                        IList<Location> searchResults = response;
                        this.Locations =
                            new ObservableCollection<LocationViewModel>(
                                searchResults.Select(
                                    x =>
                                    new LocationViewModel(new EntityWithETag<Location>(x, null), this.eventAggregator))
                                    .OrderBy(y => y.Name));
                    },
                this.eventAggregator);
        }
        private void SearchRequest(SearchRequestEvent searchRequestEvent)
        {
            searchRequestEvent.Search.SearchOptions.OrderBy = "Name";

            this.entityService.ExecuteAsyncSearch<PartyAccountability>(
                this.search = searchRequestEvent.Search,
                (response) =>
                    {
                        IList<PartyAccountability> searchResults = response;
                        this.PartyAccountabilitys =
                            new ObservableCollection<PartyAccountabilityViewModel>(
                                searchResults.Select(
                                    x =>
                                    new PartyAccountabilityViewModel(new EntityWithETag<PartyAccountability>(x, null), this.eventAggregator)).OrderBy(y => y.Name));
                    },
                this.eventAggregator);
        }
        private void SearchRequest(SearchRequestEvent searchRequestEvent)
        {
            searchRequestEvent.Search.SearchOptions.OrderBy = "ReferenceKey";

            this.entityService.ExecuteAsyncSearchRD(
                this.search = searchRequestEvent.Search,
                response =>
                    {
                        ReferenceDataList searchResults = response;
                        Dictionary<string, string> combinedResults = new Dictionary<string, string>();
                        foreach (var rd in searchResults)
                        {
                            if (combinedResults.ContainsKey(rd.ReferenceKey))
                            {
                                combinedResults[rd.ReferenceKey] = combinedResults[rd.ReferenceKey] + "|" + rd.Value;
                            }
                            else
                            {
                                combinedResults.Add(rd.ReferenceKey, rd.Value);
                            }
                        }

                        this.ReferenceDatas =
                            new ObservableCollection<ReferenceDataViewModel>(
                                combinedResults.Select(
                                    x => new ReferenceDataViewModel(x.Key, x.Value, this.eventAggregator))
                                    .OrderBy(y => y.ReferenceKey));
                    },
                this.eventAggregator);
        }