这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
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.6 KiB

LINGYUN.Abp.Dynamic.Queryable.HttpApi

Dynamic query HTTP API module, providing HTTP API implementation for dynamic querying based on the ABP framework.

Features

  • Provides dynamic query controller base class DynamicQueryableControllerBase<TEntity, TEntityDto>
  • Automatically generates REST API endpoints
  • Supports HTTP transport of dynamic query parameters

Configuration and Usage

  1. Install the LINGYUN.Abp.Dynamic.Queryable.HttpApi NuGet package

  2. Add [DependsOn(typeof(AbpDynamicQueryableHttpApiModule))] to your module class

Implementing Dynamic Query Controller

[Route("api/my-entity")]
public class MyEntityController : DynamicQueryableControllerBase<MyEntity, MyEntityDto>
{
    public MyEntityController(IDynamicQueryableAppService<MyEntityDto> dynamicQueryableAppService)
        : base(dynamicQueryableAppService)
    {
    }
}

API Endpoints

  • GET /api/my-entity/available-fields - Get available fields list
  • POST /api/my-entity/search - Query data based on dynamic conditions

Query Example

POST /api/my-entity/search
{
    "maxResultCount": 10,
    "skipCount": 0,
    "queryable": {
        "paramters": [
            {
                "field": "Name",
                "comparison": "Equal",
                "value": "test"
            }
        ]
    }
}