I’m developing a WCF Service implementing basic CRUD operations.
When implementing the UPDATE method should the method receive an instance of the object or only the updates?
For the purpose of the question let’s say I have PERSON type with various properties; (My object is more complex, has more properties of various different types)
Name (string)
Surname (string)
Age (int)
And a few more complex properties:
Father (of type PERSON)
Children (of type LIST<Person>).
I then:
1) Invoke the GETPERSON method. (Bob)
2) Update Bob's age and the name of his Father.
3) Invoke the update method.
Should I send Bob PERSON object?
Or only the UPDATEs I made to Bob, for instance maybe using collection of a new type (with name of the property and it's new value for instance)?
Thanks