More on repositories

time to read 1 min | 124 words

I forgot to add that I am using a static forwarder class to get a better syntax, so I have this (after the change from RegisterSave()/RegisterDelete() to Save()/Delete() ).

(Image from clipboard).png

Another thing that I wanted to talk about was the FindAll()/FindOne() methods. While they have their overloads for working with ICriterion (and wait for a surprise there too), they also have overloads for queries.

Now, I believe that one of the responsabilities of good API is to encourage good code, so I don't have any overload which accept a literal query, instead, all the overloads accept the name of a named query, and its parameters.