Skip to content
This repository was archived by the owner on Dec 29, 2020. It is now read-only.

Commit 1339200

Browse files
authored
Merge pull request #7 from MicroLite-ORM/develop
6.7.0
2 parents b0e106f + bb8a226 commit 1339200

File tree

8 files changed

+59
-61
lines changed

8 files changed

+59
-61
lines changed

MicroLite.Extensions.WebApi.OData.Tests/MicroLite.Extensions.WebApi.OData.Tests.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,18 @@
4949
<Reference Include="MicroLite, Version=6.3.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
5050
<HintPath>..\packages\MicroLite.6.3.1\lib\net46\MicroLite.dll</HintPath>
5151
</Reference>
52-
<Reference Include="MicroLite.Extensions.WebApi, Version=6.6.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
53-
<HintPath>..\packages\MicroLite.Extensions.WebApi.6.6.2\lib\net45\MicroLite.Extensions.WebApi.dll</HintPath>
52+
<Reference Include="MicroLite.Extensions.WebApi, Version=6.7.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
53+
<HintPath>..\packages\MicroLite.Extensions.WebApi.6.7.0\lib\net45\MicroLite.Extensions.WebApi.dll</HintPath>
5454
</Reference>
55+
<Reference Include="Microsoft.CSharp" />
5556
<Reference Include="Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
5657
<HintPath>..\packages\Microsoft.CodeCoverage.16.5.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>
5758
</Reference>
5859
<Reference Include="Moq, Version=4.13.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
5960
<HintPath>..\packages\Moq.4.13.1\lib\net45\Moq.dll</HintPath>
6061
</Reference>
6162
<Reference Include="Net.Http.WebApi.OData, Version=4.2.0.0, Culture=neutral, PublicKeyToken=d54bd485d668c081, processorArchitecture=MSIL">
62-
<HintPath>..\packages\Net.Http.WebApi.OData.4.2.0\lib\net45\Net.Http.WebApi.OData.dll</HintPath>
63+
<HintPath>..\packages\Net.Http.WebApi.OData.4.2.1\lib\net45\Net.Http.WebApi.OData.dll</HintPath>
6364
</Reference>
6465
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6566
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -78,6 +79,7 @@
7879
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
7980
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
8081
</Reference>
82+
<Reference Include="System.Web" />
8183
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8284
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
8385
</Reference>
@@ -112,6 +114,7 @@
112114
<None Include="..\MicroLite.snk">
113115
<Link>MicroLite.snk</Link>
114116
</None>
117+
<None Include="app.config" />
115118
<None Include="packages.config" />
116119
</ItemGroup>
117120
<ItemGroup>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
16+
</dependentAssembly>
17+
</assemblyBinding>
18+
</runtime>
19+
</configuration>

MicroLite.Extensions.WebApi.OData.Tests/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<packages>
33
<package id="Castle.Core" version="4.4.0" targetFramework="net48" />
44
<package id="MicroLite" version="6.3.1" targetFramework="net48" />
5-
<package id="MicroLite.Extensions.WebApi" version="6.6.2" targetFramework="net48" />
5+
<package id="MicroLite.Extensions.WebApi" version="6.7.0" targetFramework="net48" />
66
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net48" />
77
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net48" />
88
<package id="Microsoft.CodeCoverage" version="16.5.0" targetFramework="net48" />
99
<package id="Microsoft.NET.Test.Sdk" version="16.5.0" targetFramework="net48" />
1010
<package id="Moq" version="4.13.1" targetFramework="net48" />
11-
<package id="Net.Http.WebApi.OData" version="4.2.0" targetFramework="net48" />
11+
<package id="Net.Http.WebApi.OData" version="4.2.1" targetFramework="net48" />
1212
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net48" />
1313
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.0" targetFramework="net48" />
1414
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net48" />
@@ -20,4 +20,4 @@
2020
<package id="xunit.extensibility.core" version="2.4.1" targetFramework="net48" />
2121
<package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net48" />
2222
<package id="xunit.runner.visualstudio" version="2.4.1" targetFramework="net48" developmentDependency="true" />
23-
</packages>
23+
</packages>

MicroLite.Extensions.WebApi.OData/Binders/FilterBinder.cs

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ public static IOrderBy BindFilter(FilterQueryOption filterQueryOption, IObjectIn
6868
return whereSqlBuilder;
6969
}
7070

71-
/// <summary>
72-
/// Binds the specified <see cref="BinaryOperatorNode" />.
73-
/// </summary>
74-
/// <param name="binaryOperatorNode">The <see cref="BinaryOperatorNode" /> to bind.</param>
71+
/// <inheritdoc/>
7572
protected override void Bind(BinaryOperatorNode binaryOperatorNode)
7673
{
7774
if (binaryOperatorNode is null)
@@ -103,7 +100,7 @@ protected override void Bind(BinaryOperatorNode binaryOperatorNode)
103100
}
104101
else
105102
{
106-
_predicateBuilder.Append(" " + binaryOperatorNode.OperatorKind.ToSqlOperator() + " ");
103+
_predicateBuilder.Append(" ").Append(binaryOperatorNode.OperatorKind.ToSqlOperator()).Append(" ");
107104
}
108105

109106
Bind(binaryOperatorNode.Right);
@@ -112,10 +109,7 @@ protected override void Bind(BinaryOperatorNode binaryOperatorNode)
112109
_predicateBuilder.Append(")");
113110
}
114111

115-
/// <summary>
116-
/// Binds the specified <see cref="ConstantNode" />.
117-
/// </summary>
118-
/// <param name="constantNode">The <see cref="ConstantNode" /> to bind.</param>
112+
/// <inheritdoc/>
119113
protected override void Bind(ConstantNode constantNode)
120114
{
121115
if (constantNode is null)
@@ -133,10 +127,7 @@ protected override void Bind(ConstantNode constantNode)
133127
}
134128
}
135129

136-
/// <summary>
137-
/// Binds the specified <see cref="FunctionCallNode" />.
138-
/// </summary>
139-
/// <param name="functionCallNode">The <see cref="FunctionCallNode" /> to bind.</param>
130+
/// <inheritdoc/>
140131
protected override void Bind(FunctionCallNode functionCallNode)
141132
{
142133
if (functionCallNode is null)
@@ -162,7 +153,7 @@ protected override void Bind(FunctionCallNode functionCallNode)
162153
? functionCallNode.Name.Substring(2)
163154
: functionCallNode.Name;
164155

165-
_predicateBuilder.Append(name.ToUpperInvariant() + "(");
156+
_predicateBuilder.Append(name.ToUpperInvariant()).Append("(");
166157

167158
for (int i = 0; i < parameters.Count; i++)
168159
{
@@ -179,16 +170,14 @@ protected override void Bind(FunctionCallNode functionCallNode)
179170

180171
case "endswith":
181172
Bind(parameters[0]);
182-
_predicateBuilder.Append(
183-
" LIKE " + _sqlCharacters.GetParameterName(0),
184-
_sqlCharacters.LikeWildcard + ((ConstantNode)parameters[1]).Value);
173+
_predicateBuilder.Append(" LIKE ")
174+
.Append(_sqlCharacters.GetParameterName(0), _sqlCharacters.LikeWildcard + ((ConstantNode)parameters[1]).Value);
185175
break;
186176

187177
case "startswith":
188178
Bind(parameters[0]);
189-
_predicateBuilder.Append(
190-
" LIKE " + _sqlCharacters.GetParameterName(0),
191-
((ConstantNode)parameters[1]).Value + _sqlCharacters.LikeWildcard);
179+
_predicateBuilder.Append(" LIKE ")
180+
.Append(_sqlCharacters.GetParameterName(0), ((ConstantNode)parameters[1]).Value + _sqlCharacters.LikeWildcard);
192181
break;
193182

194183
case "trim":
@@ -199,20 +188,16 @@ protected override void Bind(FunctionCallNode functionCallNode)
199188

200189
case "contains":
201190
Bind(parameters[0]);
202-
_predicateBuilder.Append(
203-
" LIKE " + _sqlCharacters.GetParameterName(0),
204-
_sqlCharacters.LikeWildcard + ((ConstantNode)parameters[1]).Value + _sqlCharacters.LikeWildcard);
191+
_predicateBuilder.Append(" LIKE ")
192+
.Append(_sqlCharacters.GetParameterName(0), _sqlCharacters.LikeWildcard + ((ConstantNode)parameters[1]).Value + _sqlCharacters.LikeWildcard);
205193
break;
206194

207195
default:
208196
throw new ODataException(HttpStatusCode.NotImplemented, $"The function '{functionCallNode.Name}' is not implemented by this service");
209197
}
210198
}
211199

212-
/// <summary>
213-
/// Binds the specified <see cref="PropertyAccessNode" />.
214-
/// </summary>
215-
/// <param name="propertyAccessNode">The <see cref="PropertyAccessNode" /> to bind.</param>
200+
/// <inheritdoc/>
216201
protected override void Bind(PropertyAccessNode propertyAccessNode)
217202
{
218203
if (propertyAccessNode is null)
@@ -230,18 +215,15 @@ protected override void Bind(PropertyAccessNode propertyAccessNode)
230215
_predicateBuilder.Append(column.ColumnName);
231216
}
232217

233-
/// <summary>
234-
/// Binds the specified <see cref="UnaryOperatorNode" />.
235-
/// </summary>
236-
/// <param name="unaryOperatorNode">The <see cref="UnaryOperatorNode" /> to bind.</param>
218+
/// <inheritdoc/>
237219
protected override void Bind(UnaryOperatorNode unaryOperatorNode)
238220
{
239221
if (unaryOperatorNode is null)
240222
{
241223
throw new ArgumentNullException(nameof(unaryOperatorNode));
242224
}
243225

244-
_predicateBuilder.Append(unaryOperatorNode.OperatorKind.ToSqlOperator() + " ");
226+
_predicateBuilder.Append(unaryOperatorNode.OperatorKind.ToSqlOperator()).Append(" ");
245227
Bind(unaryOperatorNode.Operand);
246228
}
247229
}

MicroLite.Extensions.WebApi.OData/Binders/OrderByBinder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ public static IOrderBy BindOrderBy(OrderByQueryOption orderByQueryOption, IObjec
6464
return orderBySqlBuilder;
6565
}
6666

67-
/// <summary>
68-
/// Binds the specified <see cref="OrderByProperty" />.
69-
/// </summary>
70-
/// <param name="orderByProperty">The <see cref="OrderByProperty" /> to bind.</param>
67+
/// <inheritdoc/>
7168
protected override void Bind(OrderByProperty orderByProperty)
7269
{
7370
if (orderByProperty is null)

MicroLite.Extensions.WebApi.OData/Binders/SelectBinder.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ public static IWhereOrOrderBy BindSelect(SelectExpandQueryOption selectQueryOpti
6161
return SqlBuilder.Select(columnNames).From(objectInfo.ForType);
6262
}
6363

64-
/// <summary>
65-
/// Binds the specified <see cref="EdmProperty" />.
66-
/// </summary>
67-
/// <param name="edmProperty">The <see cref="EdmProperty" /> to bind.</param>
64+
/// <inheritdoc/>
6865
protected override void Bind(EdmProperty edmProperty)
6966
{
7067
if (edmProperty is null)

MicroLite.Extensions.WebApi.OData/MicroLite.Extensions.WebApi.OData.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535

3636
<ItemGroup>
3737
<PackageReference Include="MicroLite" Version="6.3.1" />
38-
<PackageReference Include="MicroLite.Extensions.WebApi" Version="6.6.2" />
38+
<PackageReference Include="MicroLite.Extensions.WebApi" Version="6.7.0" />
3939
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.7" />
4040
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
4141
<PrivateAssets>all</PrivateAssets>
4242
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4343
</PackageReference>
44-
<PackageReference Include="Net.Http.WebApi.OData" Version="4.2.0" />
44+
<PackageReference Include="Net.Http.WebApi.OData" Version="4.2.1" />
4545
<PackageReference Include="SecurityCodeScan" Version="3.4.0">
4646
<PrivateAssets>all</PrivateAssets>
4747
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
MicroLite.Extensions.WebApi.OData
22
=================================
33

4-
[![NuGet version](https://badge.fury.io/nu/MicroLite.Extensions.WebApi.OData.svg)](http://badge.fury.io/nu/MicroLite.Extensions.WebApi.OData) [![Build Status](https://dev.azure.com/trevorpilley/MicroLite/_apis/build/status/MicroLite.Extensions.WebApi.OData-CI?branchName=master)](https://dev.azure.com/trevorpilley/MicroLite/_build/latest?definitionId=3&branchName=master)
4+
|Service|Status|
5+
|-------|------|
6+
||[![NuGet version](https://badge.fury.io/nu/MicroLite.Extensions.WebApi.OData.svg)](http://badge.fury.io/nu/MicroLite.Extensions.WebApi.OData)|
7+
|/develop|[![Build Status](https://dev.azure.com/trevorpilley/MicroLite-ORM/_apis/build/status/MicroLite-ORM.MicroLite.Extensions.WebApi.OData?branchName=develop)](https://dev.azure.com/trevorpilley/MicroLite-ORM/_build/latest?definitionId=29&branchName=develop)|
8+
|/master|[![Build Status](https://dev.azure.com/trevorpilley/MicroLite-ORM/_apis/build/status/MicroLite-ORM.MicroLite.Extensions.WebApi.OData?branchName=master)](https://dev.azure.com/trevorpilley/MicroLite-ORM/_build/latest?definitionId=29&branchName=master)|
59

6-
_MicroLite.Extensions.WebApi.OData_ is an extension to the MicroLite ORM Framework which adds OData 4.0 support to the MicroLite ASP.NET WebApi extension.
10+
MicroLite.Extensions.WebApi.OData is a .NET 4.5 library which adds OData 4.0 support to the extension for the MicroLite ORM Framework which integrates with ASP.NET WebApi.
711

8-
To find out more, head over to the [Wiki](https://github.com/TrevorPilley/MicroLite.Extensions.WebApi.OData/wiki).
12+
To find out more, head over to the [Wiki](https://github.com/MicroLite-ORM/MicroLite.Extensions.WebApi.OData/wiki).
913

1014
Also, check out the [OData](http://microliteorm.wordpress.com/tag/OData/) tag on the MicroLite Blog.
1115

12-
## Supported .NET Framework Versions
16+
### Supported .NET Versions
1317

1418
The NuGet Package contains binaries compiled against:
1519

16-
* .NET 4.5
17-
18-
## Supported ASP.NET WebApi Versions
19-
20-
* ASP.NET WebApi 5.2.7
21-
22-
## Supported OData Versions
23-
24-
* OData 4.0 (via Net.Http.WebApi.OData)
20+
* .NET Framework 4.5
21+
* - MicroLite 6.3.1
22+
* - MicroLite.Extensions.WebApi 6.7.0
23+
* - Microsoft.AspNet.WebApi.Core 5.2.7
24+
* - Net.Http.WebApi.OData 4.2.1

0 commit comments

Comments
 (0)