コード例 #1
0
        public List <Club> GetAllClubs(int id)
        {
            var         cs       = Services.ContentService;
            List <Club> allClubs = new List <Club>();
            var         clubs    = cs.GetChildren(id);
            var         tc       = new TeamController();

            foreach (var club in clubs)
            {
                List <Team> teams = tc.GetTeams(club.Id);

                var c = new Club
                {
                    Id          = club.Id,
                    Name        = club.Properties["clubTitle"].Value.ToString(),
                    Description = club.Properties["clubDescription"].Value.ToString(),
                    Teams       = teams
                };
                allClubs.Add(c);
            }

            return(allClubs);
        }
コード例 #2
0
 public ClubController()
 {
     cs = Services.ContentService;
     tc = new TeamController();
 }