Exemplo n.º 1
0
        public async Task <SqlMethodResult> ExecuteAsync(IContext context, Invoke invoke)
        {
            using (var methodContext = new MethodContext(context, this, invoke)) {
                try {
                    await ExecuteContextAsync(methodContext);
                } catch (MethodException) {
                    throw;
                } catch (Exception ex) {
                    throw new MethodException($"Error while executing {MethodInfo.MethodName}: see inner exception for more information", ex);
                }

                var result = methodContext.CreateResult();

                result.Validate(this, context);

                return(result);
            }
        }