LINQ to SQL - tipos anuláveis na cláusula where
Eu tenho uma tabela com uma coluna que tem valores nulos ... quando tento consultar registros onde essa coluna é NULL:
ISSO FUNCIONA:
var list = from mt in db.MY_TABLE
where mt.PARENT_KEY == null
select new { mt.NAME };
Isso NÃO:
int? id = null;
var list = from mt in db.MY_TABLE
where mt.PARENT_KEY == id
select new { mt.NAME };
Por quê?