Skip to content

Commit 9300f41

Browse files
authored
Apply correct handler for Handler related object (#2772)
1 parent 07cdc77 commit 9300f41

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Microsoft.AspNet.OData.Shared/DeltaSetOfT.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ internal DeltaSet<TStructuralType> CopyChangedValues(IODataAPIHandler apiHandler
216216
{
217217
operation = DataModificationOperationKind.Update;
218218

219-
ODataAPIResponseStatus linkResponseStatus = handler.TryAddRelatedObject(original, out errorMessage);
219+
ODataAPIResponseStatus linkResponseStatus = apiHandlerOfT.TryAddRelatedObject(original, out errorMessage);
220220

221221
if (linkResponseStatus == ODataAPIResponseStatus.Failure)
222222
{

test/E2ETest/Microsoft.Test.E2E.AspNet.OData/BulkOperation/BulkOperationTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,11 +965,12 @@ public async Task PatchCompanies_WithUpdates_ODataId()
965965
}
966966

967967
requestUri = this.BaseAddress + "/convention/Companies(1)/OverdueOrders";
968+
var expected2 = "value\":[{\"Id\":2,\"Price\":20,\"Quantity\":2},{\"Id\":1,\"Price\":101,\"Quantity\":9}]}";
968969
using (HttpResponseMessage response = await this.Client.GetAsync(requestUri))
969970
{
970971
var json = response.Content.ReadAsStringAsync().Result;
971972
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
972-
//Assert.Contains(expected, json.ToString());
973+
Assert.Contains(expected2, json.ToString());
973974
}
974975
}
975976

0 commit comments

Comments
 (0)