mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-21 02:57:54 +08:00
feat: 动态API支持直接执行已有的应用逻辑
This commit is contained in:
@@ -73,5 +73,15 @@ namespace OpenAuth.App.Test
|
||||
var obj = await app.Delete(new DelDynamicReq() { TableName = "noentity", Ids = new string[] { "10" } });
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(obj));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestInvoke()
|
||||
{
|
||||
var app = _autofacServiceProvider.GetService<DynamicApiApp>();
|
||||
|
||||
var obj = app.Invoke(new InvokeDynamicReq { ServiceName = "UserManagerApp", MethodName = "GetParent",
|
||||
Parameters = new { userid = "0ceff0f8-f848-440c-bc26-d8605ac858cd" } });
|
||||
Console.WriteLine(JsonHelper.Instance.Serialize(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user