score:1
As noted by dna2 at the end of his question, this issue was fixed in EF 6.0.2
. To upgrade your version of EF, do the following in the Package Manager Console (VS2013 VIEW -> Other Windows -> Package Manager Console
).
Update-Package EntityFramework -Version 6.0.2
Source: stackoverflow.com
Related Articles
- How to cast LINQ generated anonymous data type list from DataView ASP .NET MVC?
- Unable to cast Anonymous Type from 'System.Linq.IQueryable' to 'System.Data.Entity.Core.Objects.ObjectQuery'
- get selected value from combobox with data source is anonymous type
- c# Linq or code to extract groups from a single list of source data
- Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types
- How to return anonymous type from c# method that uses LINQ to SQL
- Cast a IQueryable type to interface in Linq to Entities
- LINQ to SQL: Complicated query with aggregate data for a report from multiple tables for an ordering system
- How does linq actually execute the code to retrieve data from the data source?
- How to convert Anonymous Type to Strong Type from LINQ query
- What is the return type for a anonymous linq query select? What is the best way to send this data back?
- Unable to cast object of type 'System.Data.Entity.Infrastructure.DbQuery`1[]' using linq lambda expression
- When selecting an anonymous type with LINQ from EF, is there no way to run a method on an object as you select it?
- Linq cast conversion Xelement error: Unable to cast object of type 'System.Xml.Linq.XElement' to type 'System.IConvertible'
- The given value of type String from the data source cannot be converted to type int of the specified target column
- Unable to cast object of type 'WhereSelectListIterator` in LINQ
- Unable to cast the type X to type Y. LINQ to Entities only supports casting EDM primitive or enumeration types
- LINQ Issue: Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder
- Return Anonymous type from LINQ query in VB.NET
- Create same LINQ anonymous type from different XML element
- creating Linq to sqlite dbml from DbLinq source code
- LINQ to return subset of data grouped into an anonymous type
- Unable to cast the type 'DynamicClass1' to type <T>. LINQ to Entities only supports casting EDM primitive or enumeration types
- .NET service OData return anonymous type from LINQ query
- C# LINQ How to get a data source from a db?
- Removing duplicates using LINQ returns "Error removing duplicates: Unable to cast object of type 'System.Int32' to type 'System.String'."
- Possible to assign a data type to an anonymous type's members in a linq query?
- LINQ with String.Join() error: "System.InvalidCastException: Unable to cast object of type '<DistinctIterator>
- Unable to cast nvarchar to datetime when calling SQL Server stored procedure from LINQ to SQL
- Unable to cast the type 'x' to type 'y'. LINQ to Entities only supports casting EDM primitive or enumeration types
- Entity Framework Base Repository
- Linqy no matchy
- Is there a way to convert an IEnumerable into a collection of XElements?
- Linq - Narrow down a list object of events by tags within
- IQueryable does not contain a definition for 'Select'
- Combine two lists of strings of time zones
- LINQ query on entities with join returning items by category
- add predicate if property filled
- Insert to 2 tables in single query using LINQ
- Joining two tables in one datagrid usig Linq C# WPF
- How to keep GridView's sorting state? (Ascending & Descending)
- Select rows based on group by counts
- LINQ - Left Join, Group By, and Count
- building median for each string in IList<IDictionary<string, double>>
- Is there any way to optimize this LINQ to Entities query?
- The method ‘Skip’ is only supported for sorted input in LINQ to Entities. The method ‘OrderBy’ must be called before the method ‘Skip’
- Dynamic LINQ with a string?
- LinqToSql DataContext cache and memory usage
- Can't figure out a Linq join
- Order by child table in entity framework