Apology for this strangely worded question. I don\'t know what the actual problem is but hopefully someone can give me some insights.
I am getting the following error wh
I ran into this in my production environment because it was producing queries like the ones here: Why does Entity Framework 6 generate complex SQL queries for simple lookups?
This is actually related to a bug in this version of EF: https://entityframework.codeplex.com/workitem/2083
They changed the default null semantics from 5 to 6 so I'm guessing you had the same problem I did after upgrading. My machine had a fraction of the data as my remote installation and until I got to production I didn't know I had a performance issue. The queries will often produce a table scan which will time out for larger tables.
To change it back so that it works like EF5 you have to set:
DbContextConfiguration.UseDatabaseNullSemantics = true
See here: http://msdn.microsoft.com/en-us/library/system.data.entity.infrastructure.dbcontextconfiguration.usedatabasenullsemantics(v=vs.113).aspx
The bug was fixed in EF 6.1 but you still have to set the option above to get simple where conditions.