public MainWindow(IContainerProvider container) { InitializeComponent(); container.Resolve <IPreviewViewModel>(); previewWindow = container.Resolve <IPreviewWindow>(); previewWindow.Hide(); var settingsVm = container.Resolve <ISettingsViewModel>(); settingsWindow = container.Resolve <ISettingsWindow>(); var queryService = container.Resolve <IDuplicateFinder>(); settingsWindow.Hide(); this.Closing += HandleWindowClosed; DataContext = new DuplicatesViewModel(previewWindow, settingsWindow, queryService, container.Resolve <IAboutBox>(), container.Resolve <ISettingsService>()); }
public async Task <ActionResult> Duplicates(int id, bool fuzzyMatch = false) { var currentClient = await GetCurrentClient(); var account = await Db.Accounts.FirstOrDefaultAsync(x => x.ClientId == currentClient.Id && x.Id == id); if (account != null) { var dedupService = new DeduplicateService(Db); var viewModel = new DuplicatesViewModel(); if (!fuzzyMatch) { viewModel.Fill(account, await dedupService.FindExactDuplicates(account.Id), false); } else { viewModel.Fill(account, await dedupService.FindPossibleDuplicates(account.Id), true); } return(View(viewModel)); } return(HttpNotFound()); }