private List<LeaderDisplay> LeaderboardAttainments(long id)
        {
            //List<Account> members = new List<Account>();
            List<LeaderDisplay> leaders = new List<LeaderDisplay>();
            List<Membership> mems = MembershipLogic.GetByTeam(id).Where(e => e.Status == MembershipStatus.Admin || e.Status == MembershipStatus.Member).ToList();
            foreach (Membership m in mems)
            {
                Account a = aLogic.Get(m.AccountId);
                LeaderDisplay ld = new LeaderDisplay(a.FullName, a.Attainments.Count());
                leaders.Add(ld);
            }
            leaders = leaders.OrderByDescending(e => e.Value).Take(5).ToList();
            return leaders;

        }
 private List<LeaderDisplay> LeaderboardDistance(long id)
 {
     //List<Account> members = new List<Account>();
     List<LeaderDisplay> leaders = new List<LeaderDisplay>();
     List<Membership> mems = MembershipLogic.GetByTeam(id).Where(e => e.Status == MembershipStatus.Admin || e.Status == MembershipStatus.Member).ToList();
     foreach (Membership m in mems)
     {
         Account a = aLogic.Get(m.AccountId);
         double total = 0;
         foreach (Activity act in a.Activities)
         {
             total += act.Distance;
         }
         LeaderDisplay ld = new LeaderDisplay(a.FullName, total);
         leaders.Add(ld);
     }
     leaders = leaders.OrderByDescending(e => e.Value).Take(5).ToList();
     return leaders;
 }