I'm running a simple LINQ query:
var user = (from u in context.Users
where u.Email == dictionary["email"]
select u).FirstOrDefault();
When I run that, I get this exception:
LINQ to Entities does not recognize the method 'System.String get_Item(System.String)' method, and this method cannot be translated into a store expression.
If I use an intermediate step of this, it works fine.
String myDictionaryItem = dictionary["email"];
var user = (from u in context.Users
where u.Email == myDictionaryItem
select u).FirstOrDefault();
Just seems kind of odd that .Net can't think a little faster to make that connection.
(disclaimer: maybe some typos, I changed some variable names)