mrxten / QueryDesigner

QueryDesigner provides way of creating complex IQueryable filtering based on dynamic expression trees.
MIT License
74 stars 26 forks source link

SubQuery? #15

Closed hgedik closed 5 years ago

hgedik commented 5 years ago

Hi,

How I can create subQuery with your framework or can I create subquery with this?

Thank you.

mrxten commented 5 years ago

Hi, can you explain more detail what you need or provide example?

On 20 Mar 2019, at 17:50, Hasan Gedik notifications@github.com wrote:

Hi,

How I can create subQuery with your framework or can I create subquery with this?

Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

hgedik commented 5 years ago

Hi,

this is my QueryBuilder: _sqlbuilder = new QueryBuilder("dbo.Category", new[] { "Id" }, "Id", "Level", "Code", "Title", "Year", "ParentId", "CreatedDate", "CreatedBy", "ChangedDate", "ChangedBy");

I need this sql result: SELECT * FROM dbo.Category c WHERE c.Id IN ( SELECT t1.ParentId FROM dbo.Category t1 LEFT JOIN dbo.Category ON dbo.Category.Id = t1.ParentId LEFT JOIN dbo.Cpi AS k1 ON k1.CategoryId = t1.Id WHERE t1.[Archive] = 0 AND t1.[Code] NOT IN ('tt','yy') AND [k1].[Department] IN ('xxx') )

But I don't know how I can create this query with queryDesigner.

mrxten commented 5 years ago

This library making only filter for incoming query. It cannot build queries, just specify where and orderby, sorry.