예제 #1
0
        public Task <ApiResponse <TReturn> > ExecuteAndReturn <TReturn>(TConnection connection, ICommand <TReturn> command)
        {
            var commandHandler = _handlerProvider.GetCommandWithReturnHandler <TReturn>(command.GetType());

            var context = CommandExecutionContext.CreateWithReturn(
                commandHandler,
                connection,
                command);

            return(_executor.ExecuteWithReturn(context));
        }