Rask.Query
0.23.1-alpha.0.45
See the version list below for details.
dotnet add package Rask.Query --version 0.23.1-alpha.0.45
NuGet\Install-Package Rask.Query -Version 0.23.1-alpha.0.45
<PackageReference Include="Rask.Query" Version="0.23.1-alpha.0.45" />
<PackageVersion Include="Rask.Query" Version="0.23.1-alpha.0.45" />
<PackageReference Include="Rask.Query" />
paket add Rask.Query --version 0.23.1-alpha.0.45
#r "nuget: Rask.Query, 0.23.1-alpha.0.45"
#:package Rask.Query@0.23.1-alpha.0.45
#addin nuget:?package=Rask.Query&version=0.23.1-alpha.0.45&prerelease
#tool nuget:?package=Rask.Query&version=0.23.1-alpha.0.45&prerelease
Rask.Query
Server state for Rask components — the Rask.Cqrs dispatcher wrapped in a cache: request dedup, staleness, background refetch and invalidation. It is TanStack Query's model in C#, for Rask, a full-stack .NET web framework for teams of any size.
- Static
QueryClientreaches the live session's cache from anywhere a component runs —Render, a property, the constructor or an event handler — with nothing to inject.IQueryClientis the injectable face for code with no component (a hosted service, a test). - The message is the key. A query record such as
new GetOrders(Page)is its own cache key, so two components asking for the same page share one entry and one round trip. - Queries follow their inputs. Declared in
Renderfrom a route parameter, a query-string value or a prop, a query re-points itself when that value changes; there is nothing to call. - Commands.
QueryClient.Command<T>()hands back aCommand<T>withIsPending,ErrorandStatusto render, and a command record names what it makes out of date with[Invalidates(typeof(GetOrders))]. - Writes refresh queries by themselves. A Rask.Data save refetches every query about the types it wrote, on the screen of the session that made it — no invalidation to write.
- Scoped per live session, so one visitor is never served another's data.
- Subscriptions —
QueryClient.Subscribe: a published CQRS notification re-renders the pages watching it.
Install
dotnet add package Rask.Query
Use
// Program.cs
builder.Services.AddRaskCqrs();
builder.Services.AddRaskQuery();
[Route("/orders")]
public sealed partial class OrdersPage : Component
{
[QueryParam] public int Page { get; set; } = 1;
protected override Component? Render()
{
var orders = QueryClient.Query(new GetOrders(Page)); // ?page=2 shows page two, by itself
return orders.IsLoading
? P["Loading…"]
: Ul[orders.Data!.Select(o => Li[o.Number])];
}
}
Guide: Rask.Query · subscriptions
| 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. net11.0 is compatible. |
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rask.Query:
| Package | Downloads |
|---|---|
|
Rask
The one reference a Rask application needs, server or browser. On a server target (net10.0 or net11.0) it brings the ASP.NET host plus every battery — database (SQLite, PostgreSQL or SQL Server, picked by Rask:Database:Provider), mediator, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, and SQLite snapshots and continuous backup — with RaskApp.Create(args) as the entry point. On a browser target it brings the WebAssembly host, the source-generated mediator, the query cache and remote dispatch. Everything referenced is wired and on; app.Configure(c => c.Jobs.Off()) is how an app does without one. Reference Rask.Server for a lean host with no database. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.23.1-alpha.0.46 | 0 | 9/23/2026 |
| 0.23.1-alpha.0.45 | 0 | 9/23/2026 |
| 0.23.1-alpha.0.43 | 0 | 9/23/2026 |
| 0.23.1-alpha.0.38 | 0 | 9/23/2026 |
| 0.23.1-alpha.0.36 | 0 | 9/23/2026 |
| 0.23.1-alpha.0.35 | 3 | 9/23/2026 |
| 0.23.1-alpha.0.34 | 3 | 9/23/2026 |
| 0.23.1-alpha.0.33 | 41 | 9/21/2026 |
| 0.23.1-alpha.0.30 | 35 | 9/21/2026 |
| 0.23.1-alpha.0.29 | 41 | 9/21/2026 |
| 0.23.1-alpha.0.28 | 49 | 9/21/2026 |
| 0.23.1-alpha.0.27 | 47 | 9/21/2026 |
| 0.23.1-alpha.0.26 | 45 | 9/21/2026 |
| 0.23.1-alpha.0.24 | 44 | 9/21/2026 |
| 0.23.1-alpha.0.23 | 46 | 9/21/2026 |
| 0.23.1-alpha.0.22 | 39 | 9/21/2026 |
| 0.23.1-alpha.0.21 | 47 | 9/21/2026 |
| 0.23.1-alpha.0.20 | 43 | 9/21/2026 |
| 0.23.1-alpha.0.18 | 48 | 9/21/2026 |
| 0.23.0 | 122 | 9/18/2026 |