Possible Duplicate:
Linq help - Sql trace returns result, but datacontext returning null
Question 1579164
I tried changing to .Single instead of .SingleOrDefault and the object I get back is null, not 'sequence contains no elements' error. When I use SQL profiler and capture the SQL that is generated, I run the query and get 1 result. What would cause the object to be null?
Thanks for any help, ~ck
perhaps your field/properties mapping in your DBML is not correct
精彩评论