IDataApiSearch Method (DataSourceApiQuery) |
Namespace: Casewhere.Runtime.DSL.Api
DynamicQueryResult Search( DataSourceApiQuery query )
var dataApi = ctx.Use<IDataApi>(); var filter = FilterBuilder.Create().Eq("DepartmentId", ctx.Input.Id).Eq("Active", true).Build(); var result = dataApi.Search(DataSourceApiQuery .For("EmployeesWithDepartments") .FilterBy(filter)); Log.Info("Total: {TotalItems}", result.TotalItems); foreach(var emp in result.Data) Log.Info("{DepartmentName}", emp.Department.Name);