You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/Dynamic/Queryable | 1 year ago | |
| FodyWeavers.xml | 2 years ago | |
| FodyWeavers.xsd | 2 years ago | |
| LINGYUN.Abp.Dynamic.Queryable.HttpApi.csproj | 1 year ago | |
| README.EN.md | 1 year ago | |
| README.md | 1 year ago | |
README.md
LINGYUN.Abp.Dynamic.Queryable.HttpApi
动态查询HTTP API模块,提供基于ABP框架的动态查询HTTP API实现。
功能特性
- 提供动态查询控制器基类
DynamicQueryableControllerBase<TEntity, TEntityDto> - 自动生成REST API端点
- 支持动态查询参数的HTTP传输
配置使用
-
安装
LINGYUN.Abp.Dynamic.Queryable.HttpApiNuGet包 -
添加
[DependsOn(typeof(AbpDynamicQueryableHttpApiModule))]到你的模块类
实现动态查询控制器
[Route("api/my-entity")]
public class MyEntityController : DynamicQueryableControllerBase<MyEntity, MyEntityDto>
{
public MyEntityController(IDynamicQueryableAppService<MyEntityDto> dynamicQueryableAppService)
: base(dynamicQueryableAppService)
{
}
}
API端点
- GET
/api/my-entity/available-fields- 获取可用字段列表 - POST
/api/my-entity/search- 根据动态条件查询数据
查询示例
POST /api/my-entity/search
{
"maxResultCount": 10,
"skipCount": 0,
"queryable": {
"paramters": [
{
"field": "Name",
"comparison": "Equal",
"value": "test"
}
]
}
}