private IEnumerable<PlayerRecord> FetchRecordsByPlayer(Player player, Context context) { var query = (from record in context.PlayerRecords where record.PlayerRefNum == player.RefNum select record).ToList(); return query; }
private Team FetchTeamByPlayer(Player player, Context context) { var query = (from team in context.Teams where team.RefNum == player.TeamRefNum select team).SingleOrDefault(); return query; }
private Conference FetchConferenceByPlayer(Player player, Context context) { Team team = FetchTeamByPlayer(_player, _context); var query = (from conference in context.Conferences where conference.RefNum == team.ConfRefNum select conference).SingleOrDefault(); return query; }
public PlayerService(int id) { _id = id; _context = new Context(); _player = Player(); }
public PlayerViewModel(int id) { _playerService = new PlayerService(id); _player = _playerService.Player(); }