Exemplo n.º 1
0
        private async Task <SchemaDto> InvokeCommandAsync(ICommand command)
        {
            var context = await CommandBus.PublishAsync(command);

            var result   = context.Result <ISchemaEntity>();
            var response = SchemaDto.FromDomain(result, Resources);

            return(response);
        }
Exemplo n.º 2
0
        public IActionResult GetSchema(string app, string schema)
        {
            var response = Deferred.Response(() =>
            {
                return(SchemaDto.FromDomain(Schema, Resources));
            });

            Response.Headers[HeaderNames.ETag] = Schema.ToEtag();

            return(Ok(response));
        }