private ApiFilter GetInvoiceFilter(dataPack data) { var filter = new ApiFilter(filterType: FilterType.Or); var ids = data.dataPackItem?.Select(s => s.invoice.invoiceHeader.number.numberRequested.ToString()); filter.Filters = new HashSet <FilterItem>(ids.Select(s => { var f = new FilterItem("DocumentNumber"); f.Set(FilterOperator.Eq, s); return(f); })); return(filter.WithPaging(1, int.MaxValue)); }
public static FilterItem IsEqual(this FilterItem fi, object value) { fi.Set(FilterOperator.Eq, value); return(fi); }