tags:

views:

92

answers:

1

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

A: 

perhaps your field/properties mapping in your DBML is not correct

Gregoire
I doubled checked them and they do seem correct. They are all present anyways. I will check the data types.
Hcabnettek
It was a connectionstring issue. Pointing to the wrong database. Im an idiot. How can I close this question?
Hcabnettek