Whether using the Repository pattern with an Interface or just implementing DataAccess methods in an application, I often see methods with either a ‘Get’ or ‘Find’ verb preceding the method description. I struggle a bit with differentiating between the (2), because I see conflicting examples when looking at DDD repository examples, or any other Architecture using a similar naming convention. For example take a look at the following:
Function FindAllEmployees() As List(Of Employee)
Function GetAllEmployees() As List(Of Employee)
Let’s not look too closely at the subject of ‘Employee’, it is just an example; it could be anything. I am really interested if there are some guidelines on when to describe a method with a ‘Get’ vs. a ‘Find’ verb at the beginning.
Can anyone explain this or elaborate please? Thanks!
To me, FindAllEmployees indicates that it might accept a predicate with which to filter the results, whereas GetAllEmployees would do just that, return the complete list.