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); }
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)); }