I am getting this error on one PC but not on another. Both are connecting to a local SQLExpress 2008 R2 database which is identical on both machines. Both machines have VS2010 SP1 and EF4.1 (included in the tools update). It is an MVC3 Web Application project running in Cassini:
[NotSupportedException: Unable to create a constant value of type 'System.Collections.Generic.IEnumerable`1'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.]
I can't for the life of me work out why this is the case - it happens at the
IQueryable<Tag> tags = db.Tags.Where(x => !tagIds.Contains(x.Id) && x.Questions.Any(y => y.Id == question.Id)); question.Tags.Attach(tags);
The only difference I can think of is that one machine is 32-bit and the other 64, but I don't know how to determine if this is the problem for any reason.