DataClassesDataContext MyDB = new DataClassesDataContext();
var id = from wineT in MyDB.Wineries
where wineT.wineryID==Convert.ToInt32(
from w in MyDB.WineTypes
where w.kind==ddlSorti.SelectedItem.Text
select w.wineryID)
select wineT.name;
GridView1.DataSource = id;
GridView1.DataBind();
我有这段代码,我没有任何错误,但是当我启动应用程序时,我收到这个错误“无法格式化节点'ClientQuery'以作为 SQL 执行”。