Here's my code
var bt = new BachtuocvnDataContext();
var matchedTeams = (from lt in bt.Bet_Leagues_Teams
where lt.LeagueID == leagueID
select (lt)).Single();
matchedTeams.TeamID = teamID;
bt.SubmitChanges(ConflictMode.ContinueOnConflict);
It does not update the table. Traditional query works well, I found a similar question here:
http://stackoverflow.com/questions/206532/linq-not-updating-on-submitchanges
but I checked and found that Bet_Leagues_Teams does have a primary key.
Bet_Leagues_Teams class:
int ID (primary key)
int LeagueID;
int TeamID;
Ahhhh, MY TERRIBLE MISTAKE. I forgot that Bet_Leagues_Teams may not contains the record needed. I must check if the record existed, and then update it, or it does not exist and I must add it to the table. Shame on me. Forgive me for wasting your time. Thank you.