Hi all. I'm new to mvc and this whole way of programming is pretty unfamiliar for me, so be gentle ...
I have in my article repository:
public IQueryable<Article> GetArticles(int? category, int? position)
{
return from a in dc.Articles
where a.LanguageIndex == lang && a.CategoryIndex == category && a.ArticlePosition == position
select a;
}
How can I pass the parameters category and position from the interface while maitaining separation of concerns ?
I thought about :
public interface IArticleRepository
{
IQueryable<Article> GetArticles(Article a);
}
and passing the parameters along with the Article object, but this means I would have to pass the category and position in the controller. Am I in the right direction here ???