I have a Team object, a team has multiple players. In order to determine the number of players who are not substitutes, I have created the following property on the TeamEntity:
/// <summary>
/// Returns a list of all regular (non-substitute) players.
/// </summary>
public RosterCollection RegularPlayers
{
get
{
IPredicateExpression _filter = new PredicateExpression ();
_filter.Add (RosterFields.IsSub == false);
RosterCollection _players = RosterCollectionViaRosterTeam;
_players.GetMulti (_filter);
return _players;
}
}
When I call team.RegularPlayers.Count, it is returning 15, which isn't correct because there are only 13 items in the RosterTeam table.
Any thoughts would be greatly appreciated.
Thanks,
jeremiah