SearchQueryable 0.6.0
See the version list below for details.
dotnet add package SearchQueryable --version 0.6.0
NuGet\Install-Package SearchQueryable -Version 0.6.0
<PackageReference Include="SearchQueryable" Version="0.6.0" />
<PackageVersion Include="SearchQueryable" Version="0.6.0" />
<PackageReference Include="SearchQueryable" />
paket add SearchQueryable --version 0.6.0
#r "nuget: SearchQueryable, 0.6.0"
#:package SearchQueryable@0.6.0
#addin nuget:?package=SearchQueryable&version=0.6.0
#tool nuget:?package=SearchQueryable&version=0.6.0
SearchQueryable
A simple search extension for IQueryable collections.
Usage
Strict mode
By default, the search will work with a compatibility mode that is very strict, so as to support queries through EF. This mode will search all public string properties on each element contained in the collection:
myCollection.Search("term");
Additionally, a list of members can be provided to which to limit the search:
myCollection.Search(
"term",
x => x.FirstName,
x => x.LastName);
In this case, the term will only be searched withing the FirstName nad LastName members.
All mode
An All compatibility mode is also avaialble, which will try to retrieve string representations of all members and fields of any type. This is usually not compatible with most EF providers, since .ToString() in most cases can't be translated into a meaningful SQL query. It is however useful for querying in-memory collections:
myInMemoryCollection.Search("term", CompatibilityMode.All);
A version of this with provided member predicates is also available:
myInMemoryCollection.Search(
"term",
CompatibilityMode.All,
x => x.FirstName, // String public property
x => x.Age, // int private field
x => x.Address.Postcode, // Nested property of a child entity
x => x.Employer // A reference type that has a meaningful .ToString() implementation
);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.