Click or drag to resize

IDataApiSearch Method (DataObjectApiQuery)

Search Data Objects.

Namespace:  Casewhere.Runtime.DSL.Api
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
DynamicQueryResult Search(
	DataObjectApiQuery query
)

Parameters

query
Type: Casewhere.Runtime.DSL.ApiDataObjectApiQuery
The search query.

Return Value

Type: DynamicQueryResult
Collection of Data Objects.
Examples
var dataApi = ctx.Use<IDataApi>();
var filter = FilterBuilder.Create().Eq("DepartmentId", ctx.Input.Id).Eq("Active", true).Build();
var result = dataApi.Search(DataObjectApiQuery
    .For("Employee")
    .FilterBy(filter));

Log.Info("Total: {TotalItems}", result.TotalItems);
foreach(var emp in result.Data)
    Log.Info("{Employee}", emp);
See Also