- public class MyApi : ForguncyApi
- {
- [Get]
- public void TestGetApi()
- {
- //获取通过URL传递的参数
- var name = this.Context.Request.Query["name"].FirstOrDefault();
- var age = this.Context.Request.Query["age"].FirstOrDefault();
-
- //向表1中添加数据
- this.DataAccess.AddTableData("表1", new Dictionary<string, object> { { "姓名", name }, { "年龄", age } });
- }
- }
复制代码
大佬可以看看官方文档哟,上面有一些示例代码~
调试Get API - 活字格V7帮助手册 - 葡萄城产品文档中心 (grapecity.com.cn) |