Method naming...

Feb 15, 2011 at 5:41 AM
Why did they get so specific with the method named GetAllTeams(), rather than simply GetAll(). With GetAll(), the method name would be the same across all interfaces of Teams, Users, Cars, etc.

    public interface ITeamRepository
        void Add(Team post);
        void Delete(int id);
        IEnumerable<Team> GetAllTeams();
        Team GetById(int id);
        void Save();

After all, the other methods are not named AddTeam(), or DeleteTeam(), or SaveTeam(), or GetTeamById(), so why did they choose GetAllTeams().

Here's my vote to drop the noun from the GetAll() method.