Let's say we've got a type Book with ten properties. This type is a representation of the table in database.
What's the best solution to update such a type? I've used repository pattern where I got update method that take Book type and updates all its fields.
So when I want to update a Book, I'm getting it by Id from database, update fields I want (I can update 1, 2 or all its fields) and then invoke Update method on repository.
My friend by contrast tells that we should update only the fields we want, so for example if i only want to update field bookTitle I should create method in repo UpdateTitle etc.
What the best solution? To be honest I see one method in repo update with all fields much better than multiple methods to update some parts/ones properties.