public virtual void AddLeagues(Leagues league) { if (Leagues.All(x => x.Id == league.Id)) { ((IList<Leagues>)Leagues).Add(league); } }
public void Seed() { var ligaBbva = new Leagues { Name = "Liga BBVA" }; _session.Save(ligaBbva); var ligaPremier = new Leagues { Name = "Liga Premier Inglesa" }; _session.Save(ligaPremier); var ligaItaliana = new Leagues { Name = "Seria A" }; _session.Save(ligaItaliana); }