Ok, I got it. It was that I needed a code branch in the SqlArticlesProvider class. In that class's GetArticles(bool publishedOnly, int categoryID, int startRowIndex, int maximumRows) overload, I checked for the publishedOnly value, and if it was false, I delegated to the GetArticles(int categoryID, int startRowIndex, int maxiumumRows) overload.
However, I didn't check for the case: publishedOnly is true, and categoryID is less than or equal to 0. So, what ended up happening was a call to the database querying for articles with CategoryID 0, which of course, don't exist. What the call should be is: if publishedOnly is true, and categoryID is less than or equal to 0, retrieve all published articles for all categories. Here is the fixed code:
Code:
public static List<Article> GetArticles(bool publishedOnly,
int categoryID, int startRowIndex, int maximumRows)
{
if (!publishedOnly)
{
return GetArticles(categoryID, startRowIndex, maximumRows);
}
else
{
if (categoryID <= 0)
{
return GetArticles(publishedOnly, startRowIndex, maximumRows);
}
}
//otherwise, get all published articles for the specified (non-zero) category...
}