private void RunQuery <T>(IQuery <T> query) where T : class { ActionDataProvider.ProvideValue(query); var result = _mediator.Query(query); var queryResultSchema = QueryResultSchema.FromQueryResult(result); new QueryResultSchemaDataProvider(queryResultSchema).Write(); }
private void RunCommand <T>(T command) where T : ICommand { ActionDataProvider.ProvideValue(command); var result = _mediator.Command(command); if (result.IsFailure) { throw new Exception(result.ErrorMessage); } }