Пример #1
0
        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));
        }
Пример #2
0
        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));
        }