public static IEnumerable <Provision> GetFilteredProvisions(this MasterSideLetterDataAccess dataAccess, SearchRequest request, bool?hasType = null) { var filteredRequest = new SearchRequest(request) { TargetText = null, ProvisionSearchLimit = 0 }; var preparedQuery = GetProvisionSearchQuery(filteredRequest, hasType); return(dataAccess.Query <Provision>(preparedQuery.Sql.ToString(), preparedQuery.Parameters, null, false)); }