Given one fact, you can find its successors using LINQ.
For example, you can find all sites for a given user.
Use Given<T>.Match()
to define a specification.
// The parameters to the lambda are the given fact (in this case, the user) and
// the fact repository. Use the OfType<T> method to get facts from the repository.
var sitesByUser = Given<User>.Match((user, facts) =>
from site in facts.OfType<Site>()
where site.creator == user
select site);
// Query for facts matching the specification.
var sites = await jinagaClient.Query(sitesByUser, user);
jinagaClient.RenderFacts(sites)
jinagaClient.Query
returns an immutable collection of facts that match the specification.
In this example, the collection contains one site.
That site is highlighted in the following graph: