Repository navigation
fix(api): provider-agnostic org search predicate - #95
Merged
Merged
Conversation
Replace the untranslatable Contains(..., StringComparison) overload in OrganizationsService.GetOrganizations with the same ToLower().Contains() predicate the Clients search uses (#50), guarded by !IsNullOrEmpty. This translates on both Npgsql (LOWER()/strpos) and the EF Core InMemory provider, so the filter is correct on PostgreSQL and unit-testable. Add InMemory xUnit tests for org search: case-insensitive match, substring match, no-match empty, and null/empty term returns all. Closes #57
|
View your CI Pipeline Execution ↗ for commit 59e67a0
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Collaborator
Author
|
ALL-CLEAR — Org search predicate now uses the provider-agnostic |
brinehart
added a commit
that referenced
this pull request
Nov 2, 2026
Replace the untranslatable Contains(..., StringComparison) overload in OrganizationsService.GetOrganizations with the same ToLower().Contains() predicate the Clients search uses (#50), guarded by !IsNullOrEmpty. This translates on both Npgsql (LOWER()/strpos) and the EF Core InMemory provider, so the filter is correct on PostgreSQL and unit-testable. Add InMemory xUnit tests for org search: case-insensitive match, substring match, no-match empty, and null/empty term returns all. Closes #57 Co-authored-by: brinehart <ben.rinehart@avifoodsystems.comc>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57
Summary
Replaces the untranslatable
Contains(..., StringComparison)overload inOrganizationsService.GetOrganizationswith the same provider-agnostic, case-insensitive predicate the Clients search uses after #50:ToLower().Contains(...)translates on both Npgsql (SQLLOWER()/strpos) and the EF Core InMemory provider, so the filter is correct on PostgreSQL and unit-testable.EF.Functions.ILikeis deliberately not used (Npgsql-only, untranslatable under InMemory).is not nullto!string.IsNullOrEmpty(matches Clients), so an empty term adds no filter.Tests
Adds InMemory xUnit tests for
GetOrganizationssearch: case-insensitive match, substring match, no-match-empty, and null/empty term returns all.Gate
Local
./scripts/check.shgreen:nx format:check,nx affected -t lint test build, anddotnet test core/csharp/MicroZen.Core.sln— 65 passed / 0 failed.