I mapped a table to NHibernate (which's id is Indentity type), and write a repository method using NHibernate.LinQ as below:
And the code listing below is test unit:
And error when testing:

But when I use Expression:
Every thing is ok, test unit run correctly! I don't know why? If anyone know how to fix it, please help!
c8ab913a-2636-4432-b28b-01304b0ef422|0|.0