There is Campaign Entity and for that, I have CampaignRepository which have this functions

  1. public IList FindAll();
  2. public Campaign FindByCampaignNumber(string number);

But now i want this criterias -:

  1. Find campaigns that are created today.
  2. Find campaigns that are created in this month
  3. Find top 5 latest campaigns.
  4. Find campaigns that are created in this year.

So for all these campaigns filters,

Do i create separate function for each of them in repository ?

and implement like this way.

Getall campaigns and then filter required campaigns, but i do not want all campaigns. While searching in google i find this solution's

1: http://russelleast.wordpress.com/2008/09/20/implementing-the-repository-and-finder-patterns/

Is there any method i can avoid multiple functions or do i go ahead and create seperate functions for each of this filter ?

Edit
Report