internal async Task <TQuery> Get <TQuery>(Id id) where TQuery : Query { var key = GetKey <TQuery>(id); var state = await _queryDb.ReadState(QueryETag.From(key)); return((TQuery)Deserialize(key.Type, state.ReadContent())); }
public async Task <IActionResult> Get(Type type, Id id) { var etag = ReadETag(type, id); var state = await _db.ReadState(etag); return(state.NotModified ? new QueryNotModifiedResult(etag) : new QueryStateResult(state) as IActionResult); }