如何編寫linq查詢以從用戶以前不嘗試的問題表中檢索問題。Linq中的內部查詢
問題表
create table questions
(
questionID int,
question varchar,
primary key(questionID)
);
create table result
{
id int,
answered_by varchar,
questionid int,
answer varchar,
primary key (id),
foreign key (questionid) references question(questionID)
);
是什麼你的dataContext.Are你使用entityframework這個? –
http://stackoverflow.com/questions/183791/how-would-you-do-a-not-in-query-with-linq檢查這個 –