New Posts New Posts RSS Feed: Linq FirstOrNullEntity Bug?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Linq FirstOrNullEntity Bug?

 Post Reply Post Reply
Author
francois View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2009
Posts: 12
Post Options Post Options   Quote francois Quote  Post ReplyReply Direct Link To This Post Topic: Linq FirstOrNullEntity Bug?
    Posted: 14-May-2009 at 1:16pm
Hi,
 
I think there is maybe a bug when I query Guids. I have entities with Guids as primary keys.
When I do a FirstOrNullEntity on data in the cache it works fine. But when I do it with data in the SQL Compact DB it fails.
 
e.g.
EntityManager.Employees.FirstOrNullEntity(e => E.ID == testID).
 
I suspect it has to do with the fact that guids are stored in upper case in SQL and lower case in .Net. Could it be possible that it does not match correctly translating to SQL?
 
Thanks,
Francois
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 14-May-2009 at 6:59pm

If the collation defined for the database specifies case sensitivity then that could be causing this error.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down