Type-safe, serializable LINQ from a client to a server-side EF Core model.
When a UI evolves quickly, server-side querying usually forces a choice between hand-coding a bespoke endpoint and contract per use case, or adopting GraphQL/OData and shaping queries with a separate query language. Scry removes that trade-off while keeping everything in C# and strongly typed end to end:
- The EF Core model lives server-side. The client never references it — it is pointed at by path.
- A source generator in the client reads the model assembly directly by path
(
System.Reflection.Metadata), applies an allow-list, and generates strongly-typed client query DTOs plus a queryable entry point. - The UI writes ordinary LINQ against the generated types.
- The LINQ is captured and serialized to a restricted query AST.
- The server deserializes, re-validates against the allow-list at runtime, rebinds to the real EF types, executes, and returns the projected rows.
Add or extend a query by writing LINQ in the client — no new endpoint, no new contract — while the server stays in full control of which types, properties, shapes, and rows can ever be returned.
| Package | Purpose |
|---|---|
Scry.Annotations |
Allow-list attributes applied to the server model. |
Scry.Wire |
The serializable query AST shared by client and server. |
Scry.Client |
Client-side IQueryable provider (no EF dependency). |
Scry.Server |
Server-side validation + execution against EF Core. |
Scry.SourceGenerator |
Generates client query DTOs from the server model. |
Source is MIT. Binary releases are subject to the Open Source Maintenance Fee.
Ripple by Zach Bogart via The Noun Project