diff --git a/PTrampert.SimplePatch.Sample/Controllers/PeopleController.cs b/PTrampert.SimplePatch.Sample/Controllers/PeopleController.cs index 7d024b6..2884cd9 100644 --- a/PTrampert.SimplePatch.Sample/Controllers/PeopleController.cs +++ b/PTrampert.SimplePatch.Sample/Controllers/PeopleController.cs @@ -48,7 +48,7 @@ public ActionResult UpdatePerson(int id, [FromBody] PersonWrite [HttpPatch("{id:int}")] public ActionResult PatchPerson( int id, - // PTrampert.SimplePatch automatically generates an implementation of IPatchObjectFor + // PTrampert.SimplePatch automatically generates an implementation of IPatchObject [FromBody] IPatchObject patchObject) { // Validation is preserved on the patch object, so we can check ModelState diff --git a/README.md b/README.md index f61d76a..a8885fb 100644 --- a/README.md +++ b/README.md @@ -50,14 +50,14 @@ public record PersonWriteModel public PhoneNumber? PhoneNumber { get; init; } } ``` -* Use `IPatchObjectFor` to create an optional object for PATCH operations: +* Use `IPatchObject` to create an optional object for PATCH operations: ```csharp [HttpPatch("{id:int}")] public ActionResult PatchPerson( int id, - // PTrampert.SimplePatch automatically generates an implementation of IPatchObjectFor - [FromBody] IPatchObjectFor patchObject) + // PTrampert.SimplePatch automatically generates an implementation of IPatchObject + [FromBody] IPatchObject patchObject) { // Validation is preserved on the patch object, so we can check ModelState if (!ModelState.IsValid) diff --git a/docs/getting-started.md b/docs/getting-started.md index d91587e..3dba822 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -51,7 +51,7 @@ dotnet add package PTrampert.SimplePatch if (person == null) return NotFound(); // Apply the patch and get the updated model - var updatedPerson = patch.ApplyTo(person); + var updatedPerson = patch.Patch(person); db.People.Update(updatedPerson); db.SaveChanges(); return Ok(updatedPerson);