I have often violated this rules with methods named Get*, without parameters, that returns a list of items, like
public interface IBlogRepository
{
IEnumerable GetBlogPosts();
}
I have now realized that this is probably an error, since there should always be some kind of paging (see also Ayendes comments on this).
So the correct solution is something like
public interface IBlogRepository
{
IEnumerable GetBlogPosts(int pageSize, int pageNumber);
}
No comments:
Post a Comment