I am writing updaters for my component-store.
The situation is as follows:
I am wondering which design is better.
readonly updateOneProcessingStatus = this.updater(...);
readonly updateProcessingStatuses = this.updater(...);
updateProcessingStatuses()
.readonly updateProcessingStatuses = this.updater(...);
And I also want to know if my naming is acceptable or not. (e.g. plural)
Thanks!
In my view, it is better to create two functions update()
and updateRange()
. By doing this your API will be cleaner and when new developer will try to update, then she/he will have clear understanding what method should be used.
In addition, it can be seen that this approach is used in Entity Framework. UpdateRange() and just simple Update() method