public async Task NavigateToJobList(string searchParameters = "") { ParametersSearch parameters = new ParametersSearch { EntryKeyWord = searchParameters.Replace(System.Environment.NewLine, " "), IsRemote = isRemote.ToString() }; await NavigationService.NavigateAsync("JobsListView", new NavigationParameters { { "ListJobs", parameters } }); }
internal List <Models.Method> GetListMethods(ParametersSearch parametersSearch) { GetListMethodsService(); List <Models.Method> methods = null; using (MethodStoreContext context = new MethodStoreContext()) { DbSet <Models.Method> contextMethods = context.Methods; IQueryable <Models.Method> contextMethodsSearch = null; if (!string.IsNullOrWhiteSpace(parametersSearch.Text)) { string searchText = parametersSearch.Text; contextMethodsSearch = contextMethods.Where(f => parametersSearch.SearchInGroup && f.Group.Contains(searchText, StringComparison.OrdinalIgnoreCase) || parametersSearch.SearchInType && f.Type.Contains(searchText, StringComparison.OrdinalIgnoreCase) || parametersSearch.SearchInObjectName && f.ObjectName.Contains(searchText, StringComparison.OrdinalIgnoreCase) || parametersSearch.SearchInMethodName && f.MethodName.Contains(searchText, StringComparison.OrdinalIgnoreCase)); } if (contextMethodsSearch == null) { contextMethodsSearch = contextMethods.Where(f => true); } contextMethodsSearch?.OrderByDescending(f => f.ID); try { methods = contextMethodsSearch?.ToList(); } catch (Exception ex) { Messages.Show("При поиске произошла ошибка.\n" + ex.Message); } } return(methods); }