public virtual async Task <IActionResult> GetAsync(Guid id) { var context = new RepositoryQueryContext <TReadModel, Guid>(readModelRepository, HttpContext); var value = await context.GetValueAsync(id); this.Response.Headers.Add("ETag", new StringValues(value.Value.Version.ToString())); return(Ok(value)); }
public virtual async Task <IActionResult> GetAsync(TKey id) { var context = new RepositoryQueryContext <TAggregateRoot, TKey>(Repository, HttpContext); var value = await context.GetValueAsync(id); this.Response.Headers.Add("ETag", new StringValues(value.Value.Version.ToString())); return(Ok(value)); }