More on repositories

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.

Print | posted on Sunday, July 30, 2006 9:50 AM

Feedback


Gravatar

#  8/2/2006 5:21 PM John Meilleur

What's the difference between the Get(id) and Load(id) methods?


Gravatar

#  8/2/2006 7:59 PM Ayende Rahien

Get will return null if the id doesn't exist.
Load will throw.

Comments have been closed on this topic.