Scry.Client
0.1.0-beta.5
dotnet add package Scry.Client --version 0.1.0-beta.5
NuGet\Install-Package Scry.Client -Version 0.1.0-beta.5
<PackageReference Include="Scry.Client" Version="0.1.0-beta.5" />
<PackageVersion Include="Scry.Client" Version="0.1.0-beta.5" />
<PackageReference Include="Scry.Client" />
paket add Scry.Client --version 0.1.0-beta.5
#r "nuget: Scry.Client, 0.1.0-beta.5"
#:package Scry.Client@0.1.0-beta.5
#addin nuget:?package=Scry.Client&version=0.1.0-beta.5&prerelease
#tool nuget:?package=Scry.Client&version=0.1.0-beta.5&prerelease
Scry.Client
Client-side LINQ provider for Scry. Write ordinary LINQ against the source-generated query models; Scry captures it, serializes it to the query AST, and sends it to the server. No EF dependency, so it stays small in a trimmed Blazor WebAssembly app.
This package also ships the Scry source generator, so a client project needs only a <ScryModelDll> path to the server model's built DLL — never a reference to it.
<a id='snippet-clientModelPath'></a>
<ScryModelDll>$(MSBuildThisFileDirectory)..\Sample.Model\bin\$(Configuration)\net10.0\Sample.Model.dll</ScryModelDll>
<sup><a href='/samples/Sample.Client/Sample.Client.csproj#L7-L10' title='Snippet source file'>snippet source</a> | <a href='#snippet-clientModelPath' title='Start of snippet'>anchor</a></sup>
Register the client over a named HttpClient, so its base address — and any handler pipeline it grows — stays separate from every other call the application makes:
<a id='snippet-clientRegistration'></a>
builder.Services.AddHttpClient(
"scry",
_ => _.BaseAddress = new(builder.HostEnvironment.BaseAddress));
builder.Services.AddScryClient(
"/api/query",
_ => _.GetRequiredService<IHttpClientFactory>().CreateClient("scry"));
builder.Services.AddScoped<ScryQuery>();
<sup><a href='/samples/Sample.Client/Program.cs#L14-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-clientRegistration' title='Start of snippet'>anchor</a></sup>
Blazor WebAssembly is the exception: there is one HttpClient, the browser backs it, and it already points at the app's own origin, so nothing needs disambiguating and the shorter overload avoids pulling Microsoft.Extensions.Http into the payload.
<a id='snippet-clientWasmRegistration'></a>
services.AddScoped(
_ => new HttpClient
{
BaseAddress = new("https://localhost")
});
services.AddScryClient("/api/query");
services.AddScoped<ScryQuery>();
<sup><a href='/samples/Sample.Tests/ClientRegistrationTests.cs#L19-L27' title='Snippet source file'>snippet source</a> | <a href='#snippet-clientWasmRegistration' title='Start of snippet'>anchor</a></sup>
<a id='snippet-clientQuery'></a>
employees = await Query
.Employee
.Where(_ => _.Active)
.OrderBy(_ => _.Name)
.Select(_ => new EmployeeRow(_.Name, _.Status, _.Manager!.Name, _.Department!.Name))
.ToListAsync();
<sup><a href='/samples/Sample.Client/Pages/Index.razor.cs#L48-L55' title='Snippet source file'>snippet source</a> | <a href='#snippet-clientQuery' title='Start of snippet'>anchor</a></sup>
Docs: Getting started · Writing queries · Source generator
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Scry.Wire (>= 0.1.0-beta.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.5 | 50 | 8/30/2026 |
| 0.1.0-beta.4 | 62 | 8/15/2026 |
| 0.1.0-beta.3 | 69 | 8/2/2026 |
| 0.1.0-beta.2 | 59 | 7/31/2026 |
| 0.1.0-beta.1 | 56 | 7/26/2026 |