Skip to content

Commit a7a67fc

Browse files
committed
updates
1 parent c27b054 commit a7a67fc

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal DeltaSet<TStructuralType> CopyChangedValues(PatchMethodHandler<TStructu
107107

108108
DeltaDeletedEntityObject<TStructuralType> deletedObj = changedObj as DeltaDeletedEntityObject<TStructuralType>;
109109

110-
if (deletedObj != null || patchStatus == PatchStatus.Failure)
110+
if (patchStatus == PatchStatus.Failure || (deletedObj != null && patchStatus == PatchStatus.NotFound))
111111
{
112112
IDeltaSetItem deltaSetItem = changedObj;
113113

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ public ITestActionResult PatchUnTypedFriends(int key, [FromBody] EdmChangedObjec
298298
}
299299
}
300300

301-
302-
303301
return Ok(changedObjColl);
304302
}
305303
else if(key ==2)
@@ -310,12 +308,12 @@ public ITestActionResult PatchUnTypedFriends(int key, [FromBody] EdmChangedObjec
310308

311309
var friendCollection = new FriendColl<IEdmStructuredObject>() { entity };
312310

313-
var changedObjColl = friendColl.Patch(new EmployeeEdmPatchHandler(entitytype));
311+
var changedObjColl = PatchWithUsersMethodTypeLess(key, friendColl);
314312

315313
object obj;
316-
Assert.Single(friendCollection);
314+
Assert.Single(changedObjColl);
317315

318-
friendCollection.First().TryGetPropertyValue("Age", out obj);
316+
changedObjColl.First().TryGetPropertyValue("Age", out obj);
319317
Assert.Equal(35, obj);
320318

321319
return Ok(changedObjColl);

0 commit comments

Comments
 (0)