tghamm/dynamic-linq-query-builder

Searching in tables with many(1-N) relationships in jquery querybuilder

Closed this issue · 1 comments

Hi,

As you can see in the picture, there are 3 tables I want to search.

image

works very well with a single entity. For example, there is an online querybuilder demo I created here http://jsfiddle.net/mustafaerdogmus/kdbh0m68/35/

image

querybuilder plugin output data

{ "condition": "AND", "rules": [ { "id": "ad", "field": "Ad", "type": "string", "input": "text", "operator": "equal", "value": "Mustafa" }, { "id": "soyad", "field": "Soyad", "type": "string", "input": "text", "operator": "equal", "value": "Erdoğmuş" }, { "id": "dogumTarihi", "field": "DogumTarihi", "type": "date", "input": "text", "operator": "equal", "value": "01/01/1988" } ], "not": false, "valid": true }

public async Task<JsonResult> FiltreleAsync([FromBody]QueryBuilderFilterRule queryBuilderFilterRule ) { var searchResult = _context.Person.AsQueryable().BuildQuery(queryBuilderFilterRule); }

works very well with a single entity(person sql table) . But multiple entity for query create I want to use.

As I tried to explain, how can I search in many to many tables using querybuilder and linq query builder?

It's not terribly well suited to this use case unfortunately.