public void WithNamedArgument() { var procName = ObjectName.Parse("APP.proc1"); var arg = new InvokeArgument("a", SqlExpression.Constant("Hello!")); AdminQuery.Call(procName, arg); }
public void WithNamedArguments() { var procName = ObjectName.Parse("APP.proc2"); var arg1 = new InvokeArgument("a", SqlExpression.Constant("Hello")); var arg2 = new InvokeArgument("b", SqlExpression.Constant("World!")); AdminQuery.Call(procName, arg1, arg2); }
public void CallExternalWithArguments() { var procName = ObjectName.Parse("APP.extProc"); var arg1 = new InvokeArgument("a", SqlExpression.Constant("Hello")); var arg2 = new InvokeArgument("b", SqlExpression.Constant("World!")); var result = AdminQuery.Call(procName, arg1, arg2); Assert.IsNotNull(result); Assert.AreEqual(1, result.Count); Assert.IsNotNullOrEmpty(ExternProcedureResult); Assert.AreEqual("Hello World!", ExternProcedureResult); }
public void WithOutputArgument() { var procName = ObjectName.Parse("APP.proc3"); var arg = new InvokeArgument("a", SqlExpression.Constant("Hello")); var result = AdminQuery.Call(procName, arg); Assert.IsNotNull(result); Assert.AreEqual(1, result.Count); Field value; Assert.IsTrue(result.TryGetValue("b", out value)); Assert.IsFalse(Field.IsNullField(value)); Assert.AreEqual("Hello", ((SqlString)value.Value).ToString()); }