Iam new to this. Iam having a problem where i cant get the selsection change to work the error is in this line where s.TeamTBL.TeamID == statsmain
Iam to to connect the teamID in the Teams table to the TeamID in the statsTBL
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var query = from t in db.TeamTBLs
orderby t.Postion ascending
select new
{
t.Postion,
t.TeamName,
t.Wins,
t.Draws,
t.Losses,
t.Points
};
TblTeamsData.ItemsSource = query.ToList();
}
private void List_Teams_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string statsmain = (string)TblTeamsData.SelectedItem;
if (statsmain != null)
{
var query = (from s in db.StatsTBLs
where s.TeamTBL.TeamID == statsmain ) ;
}
}