@@ -116,18 +116,37 @@ You can use projection in select & filters clauses with navigation properties (o
116116- Filter projection: [ /products?** salesorderdetail.product.productid=1** ] ( /products?salesorderdetail.product.productid=1 )
117117
118118## Dto projection
119+ You can still use dto projection and query over your dto with defined type:
119120``` c#
120121[HttpGet ]
121122[AutoQueryable ]
122123public IQueryable Get ([FromServices ] AdventureWorksContext adventureWorksContext )
123124{
124125 return adventureWorksContext .Product .Select (p => new ProductProjection
125126 {
126- Name = p .Name
127+ Name = p .Name ,
128+ ProductColor = p .Color ,
129+ FinalPrice = p .price
127130 });
128131}
129132```
130133
134+ Or anonymous type:
135+ ``` c#
136+ [HttpGet ]
137+ [AutoQueryable ]
138+ public IQueryable Get ([FromServices ] AdventureWorksContext adventureWorksContext )
139+ {
140+ return adventureWorksContext .Product .Select (p => new
141+ {
142+ p .Name ,
143+ p .Color ,
144+ FinalPrice = p .Price
145+ });
146+ }
147+ ```
148+
149+
131150## Unselectable properties
132151If you want some properties to be unselectable (eg: Id, Password, ...)
133152``` c#
@@ -167,7 +186,14 @@ public class UsersController
167186}
168187```
169188
170- Roadmap :
189+ ## Roadmap :
190+ - Add Demo
191+ - Add more date filters in where clause eg: yearEquals
192+ - Add capability to use Group by
193+ - Add capability to set AutoQueryable options in headers
194+ - Add capability to choose to ignore case or not (case is ignored for now)
195+ - Add an option to not use dynamic objects (Use the type T provided by the IQueryable<T >)
196+ - Add Odata-v(x) & others as plugin (choose beetween AutoQueryable, Odata or others for query)
171197- ~~ Add ** Top** , ** Skip** , ** Take** , ** OrderBy** keywords~~
172198- ~~ Add capability to include navidation properties (aka expand in OData)~~
173199- ~~ Add capability to select properties (columns in table)~~
@@ -189,14 +215,8 @@ Roadmap :
189215- ~~ Add maximum value on clauses (eg maximum top 999)~~
190216- ~~ Add Sortable/unsortable properties~~
191217- ~~ Add Allowed/Disallowed wrapper parts~~
192- - Add Max depth
193- - Add Demo
194- - Add more date filters in where clause eg: yearEquals
195- - Add capability to choose to ignore case or not (case is ignored for now)
196- - Add capability to use Group by
197- - Add capability to set AutoQueryable options in headers
198- - Add an option to not use dynamic objects (Use the type T provided by the IQueryable<T >)
199- - Add Odata-v(x) & GraphQL as plugin (choose beetween AutoQueryable, Odata or GraphQL for query)
218+ - ~~ Add Max depth~~
219+ - ~~ Add Datetime operations~~
200220
201221## Buy me a beer
202222[ ![ Donate] ( https://img.shields.io/badge/Donate-PayPal-green.svg )] ( https://www.paypal.me/trenoncourt/5 )
0 commit comments