CustomFilterViewModel CreateCustomFilterViewModel(FilterItem existing, bool save)
        {
            var viewModel = CustomFilterViewModel.Create(typeof(TEntity), settings.HiddenFilterProperties, settings.AdditionalFilterProperties);

            viewModel.FilterCriteria = existing.FilterCriteria;
            viewModel.FilterName     = existing.Name;
            viewModel.Save           = save;
            viewModel.SetParentViewModel(this);
            return(viewModel);
        }
 void ShowFilter(FilterItem filterItem, CustomFilterViewModel filterViewModel, Action onSave)
 {
     if (FilterDialogService.ShowDialog(MessageButton.OKCancel, "Create Custom Filter", "CustomFilterView", filterViewModel) != MessageResult.OK)
     {
         return;
     }
     filterItem.FilterCriteria = filterViewModel.FilterCriteria;
     filterItem.Name           = filterViewModel.FilterName;
     ActiveFilterItem          = filterItem;
     if (filterViewModel.Save)
     {
         onSave();
         UpdateFilters();
     }
 }