1

In my code there is many method to 'get or add'. It finds objects in the collection, if exists return, and if not exists create and return.

So there are many GetOrAddSomething() methods, but it smells not good.

Is there a general term for get or add/create? like 'upsert'

leffe
  • 67
  • 5
  • Does this answer your question? [What's a good name for a method that gets or creates an object?](https://stackoverflow.com/questions/3184197/whats-a-good-name-for-a-method-that-gets-or-creates-an-object) – Ben Smith Sep 08 '22 at 22:23

0 Answers0