Created
August 24, 2016 14:48
-
-
Save zivillian/29fa3d25012def9e0f14edde02f75124 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Simple.OData.Client.Core/ODataClient.Internals.cs | 15 +++++++++------ | |
| 1 file changed, 9 insertions(+), 6 deletions(-) | |
| diff --git a/Simple.OData.Client.Core/ODataClient.Internals.cs b/Simple.OData.Client.Core/ODataClient.Internals.cs | |
| index c79e0ac..53431d4 100644 | |
| --- a/Simple.OData.Client.Core/ODataClient.Internals.cs | |
| +++ b/Simple.OData.Client.Core/ODataClient.Internals.cs | |
| @@ -23,13 +23,16 @@ namespace Simple.OData.Client | |
| var result = await ExecuteRequestWithResultAsync(request, cancellationToken, | |
| x => x.AsEntry(_session.Settings.IncludeAnnotationsInResults), () => null, () => request.EntryData).ConfigureAwait(false); | |
| - if (cancellationToken.IsCancellationRequested) cancellationToken.ThrowIfCancellationRequested(); | |
| + if (cancellationToken.IsCancellationRequested) cancellationToken.ThrowIfCancellationRequested(); | |
| - var keyNames = _session.Metadata.GetDeclaredKeyPropertyNames(commandText); | |
| - if (result == null && resultRequired && Utils.AllMatch(keyNames, entryData.Keys, _session.Pluralizer)) | |
| - { | |
| - result = await this.GetEntryAsync(commandText, entryData, cancellationToken).ConfigureAwait(false); | |
| - if (cancellationToken.IsCancellationRequested) cancellationToken.ThrowIfCancellationRequested(); | |
| + if (result == null && resultRequired) | |
| + { | |
| + var keyNames = _session.Metadata.GetDeclaredKeyPropertyNames(commandText); | |
| + if (Utils.AllMatch(keyNames, entryData.Keys, _session.Pluralizer)) | |
| + { | |
| + result = await this.GetEntryAsync(commandText, entryData, cancellationToken).ConfigureAwait(false); | |
| + if (cancellationToken.IsCancellationRequested) cancellationToken.ThrowIfCancellationRequested(); | |
| + } | |
| } | |
| return result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment