following systex is correct
Player player = context.Players.Where(i => i.TeamID == id).FirstOrDefault();
You need to check by debugging
you can use following also
var pl = (from x in context.Players
where TeamID == id
select x)FirstOrDefault();
and by the inline query
var data = context.Database.SqlQuery<player>
("select *
from Players where TeamID=" + id + "", "");</player>