internal async Task <TQuery> GetQuery <TQuery>(Id instanceId, ExpectTimeout timeout) where TQuery : Query { var key = _area.Queries.Get <TQuery>().CreateKey(instanceId); await GetQueryInstance(key).WaitForLatest(timeout); return((TQuery)await _clientDb.ReadQuery(key)); }
public async Task <IActionResult> Get(Type type, Id id) { var etag = ReadETag(type, id); var state = await _clientDb.ReadQuery(etag); return(state.NotModified ? new QueryNotModifiedResult(etag) : new QueryStateResult(state) as IActionResult); }
public Task <Query> ReadQuery(Func <AreaMap, FlowKey> getKey) => _clientDb.ReadQuery(getKey(_area));