public SeasonTeam(Competition competition, Team parent, string name, string nickName, string shortName, int skill, string owner, int?year, SeasonTeamStats stats, SeasonDivision division, IList <CompetitionPlayer> players) : base(competition, parent, name, nickName, shortName, skill, owner, year, players) { Stats = stats; if (Stats == null) { Stats = new SeasonTeamStats(); } Division = division; }
public SeasonDivision(Season season, SeasonDivision parentDivision, int year, string name, int level, int order, List <SeasonTeam> teams) { Season = season; ParentDivision = parentDivision; Year = year; Name = name; Teams = teams; Ordering = order; Level = level; }
public virtual List <SeasonTeam> GetAllTeamsInDivision(SeasonDivision division) { var result = new List <SeasonTeam>(); if (division.Teams != null && division.Teams.Count > 0) { result.AddRange(division.Teams); } Divisions.Where(d => d.ParentDivision != null && d.ParentDivision.Name.Equals(division.Name)).ToList().ForEach(div => { result.AddRange(GetAllTeamsInDivision(div)); }); return(result); }
public SeasonTeam(Competition competition, Team parent, int year, SeasonTeamStats stats, SeasonDivision division) : this(competition, parent, parent.Name, parent.NickName, parent.ShortName, parent.Skill, parent.Owner, year, stats, division, null) { }