I'm creating a reference model for the Repository layer in a new app. I'm starting with UserRepository. I like the idea of following a CRUD (Create-Read-Update-Delete) naming convention at the repo level. This feels natural for the GetById method:
public User Read(int userId)
It seems to feel less natural for the Search method:
public List<User> Read(UserQuery query)
Do you ever try to follow a CRUD naming convention for your repositories? Would you define a Search method signature in the way I defined my second method signature above or would you follow a different naming convention?
Aucun commentaire:
Enregistrer un commentaire