Skip to content

Commit 32f919d

Browse files
authored
Merge pull request #27 from trenoncourt/develop
update project to 1.3 & update doc
2 parents dfc1f7f + ae44253 commit 32f919d

File tree

5 files changed

+44
-14
lines changed

5 files changed

+44
-14
lines changed

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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]
122123
public 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
132151
If 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)

build.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ dotnet restore
55
dotnet build
66

77
dotnet pack ".\src\AutoQueryable" -c Release -o ".\bin\NuGetPackages"
8+
dotnet pack ".\src\AutoQueryable.Core" -c Release -o ".\bin\NuGetPackages"
9+
dotnet pack ".\src\AutoQueryable.Providers.OData" -c Release -o ".\bin\NuGetPackages"
810
dotnet pack ".\src\AutoQueryable.AspNet.Filter" -c Release -o ".\bin\NuGetPackages"
911
dotnet pack ".\src\AutoQueryable.AspNetCore.Filter" -c Release -o ".\bin\NuGetPackages"
1012
dotnet pack ".\src\AutoQueryable.Nancy.Filter" -c Release -o ".\bin\NuGetPackages"

src/AutoQueryable.Core/AutoQueryable.Core.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard1.3</TargetFrameworks>
4+
<VersionPrefix>1.3.0</VersionPrefix>
5+
<Version>1.3.0</Version>
6+
<AssemblyVersion>1.3.0.0</AssemblyVersion>
7+
<FileVersion>1.3.0.0</FileVersion>
48
</PropertyGroup>
59
<ItemGroup>
610
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />

src/AutoQueryable.Providers.OData/AutoQueryable.Providers.OData.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netstandard1.3</TargetFramework>
4+
<VersionPrefix>1.3.0</VersionPrefix>
5+
<Version>1.3.0</Version>
6+
<AssemblyVersion>1.3.0.0</AssemblyVersion>
7+
<FileVersion>1.3.0.0</FileVersion>
48
</PropertyGroup>
59
<ItemGroup>
610
<ProjectReference Include="..\AutoQueryable.Core\AutoQueryable.Core.csproj" />

src/AutoQueryable/AutoQueryable.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Description>AutoQueryable add auto querying functionality like OData with best url practices to Asp.Net Core.</Description>
44
<AssemblyTitle>AutoQueryable add auto querying functionality like OData with best url practices to Asp.Net Core.</AssemblyTitle>
5-
<VersionPrefix>1.2.0</VersionPrefix>
5+
<VersionPrefix>1.3.0</VersionPrefix>
66
<Authors>Thibaut Renoncourt</Authors>
77
<TargetFrameworks>netstandard1.3</TargetFrameworks>
88
<AssemblyName>AutoQueryable</AssemblyName>
@@ -14,9 +14,9 @@
1414
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
1515
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1616
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
17-
<Version>1.2.0</Version>
18-
<AssemblyVersion>1.2.0.0</AssemblyVersion>
19-
<FileVersion>1.2.0.0</FileVersion>
17+
<Version>1.3.0</Version>
18+
<AssemblyVersion>1.3.0.0</AssemblyVersion>
19+
<FileVersion>1.3.0.0</FileVersion>
2020
</PropertyGroup>
2121
<ItemGroup>
2222
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />

0 commit comments

Comments
 (0)