I am trying to create a simple search against some organizations (EF4, if it does not matter) There is a list of the criteria given in the search query. The Catheteria object looks like this:
Search for Public Square Claims Katrina {Public Guide} Financial Year {Received; Set; } Public bool AllClaimants {receive; Set; } Public IList & lt; Guid & gt; Claimant ID {Receive; Set; } Receive Public Alltelense Categories {AllExpenseCategories}; Set; } Public IList & lt; ExpenseCategoryAndTypeCriteria & gt; EpenseCategoryAndTypes {Get; Set; }}
and expenditure category and type carrier
public category expense category and TypeCarectia {get public good expenditure category; Set; } Receive Public Child AllTypesInCatgeory {}; Set; } Public IList & lt; Guid & gt; Spend type {receive; Set; }}
Searching on financial years and claimants need to have another query, I need expense categories and expense types to be added as any other sub query.
In short, I'm trying to:
Choose from claim * from where & lt; Financial year & gt; And & lt contenders & gt; And (expense type 1 or expense type 2 or expense category X)
I have yet found:
public endorsement search & lt; Claim & gt; Search (claim-findcartieria search index, int page, int pages) {var query = all (); If (searchCriteria.FinancialYear.HasValue) {query = query where the claim is by claim. Fiscal year == Search criteria.FinancialYear claims; } If (Search Search Certifier. All Clements) {query = Select the claim from query, where searchCriteria.ClaimantIds.Contains (claim.ClaimantId) claims; } If search (search result, all expense categories) {foreach (various items in search. Certification.AppCentry Categories and Types) {if (Item Alitips Inkjetari) {// Bus Search on query query = query. Where (claim = & liability; where item. Expans category == transaction.express type. Select transaction in expense character i. Command ()> gt; 0); } Else {// search for specific query type query = query. Where (Claim => (Clearing Transactions from Claim in Claims. Items where ExpandTaps.Conclusion (Transaction ExpeditIDID) Select Transaction) .Count ()> gt; 0); }}} Perge sequent result and lieutenant; Claim & gt; Create (query, page size, page); }
I am currently seeing that the last expenditure category request is the only spending category for which I get results. Apart from this, by looking at the code, it seems that I expect it to create a series and questions, rather it is necessary or
Any hint?
You can do this by using asExpandable ()
When the unit framework queries.
Comments
Post a Comment