score:1
Because LINQ to Entities queries are translated to SQL queries, so each operation you do must have an equivalent in SQL.
Constructors which are nothing more than methods can't be translated.
But instantiating an anonymous type can, it will simply be translated as:
SELECT someAlias.Key, someAlias.Time ...
Source: stackoverflow.com
Related Query
- Tuples - Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities in linq join with tuples
- Only parameterless constructors and initializers are supported in LINQ to Entities message
- f#: Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities
- How to handle Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities. (ASP.NET Web API)
- Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities
- ExceptionMessage: Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities. GeoCoordinate(latitude, longitude);
- ASP.NET - Entity Framework - Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities - MVC / C#
- Only parameterless constructors and initializers are supported in LINQ to Entities error while doing version check
- Comparing Nullable Datetime got error Only parameterless constructors and initializers are supported in LINQ to Entities
- Only parameterless constructors and initializers are supported in LINQ to Entities error
- Error: Only parameterless constructors and initializers are supported in LINQ to Entities
- 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- The specified type member is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- Entity Framework Linq Query to List - Error when using contains: Only primitive types, enumeration types and entity types are supported
- Only parameterless constructors and initializers for Entities?
- The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties
- Only initializers, entity members, and entity navigation properties are supported
- Cannot compare elements of type 'System.Collections.Generic.ICollection`1 Only primitive types, enumeration types and entity types are supported
- Unable to create a constant value of type (type) Only primitive types ('such as Int32, String, and Guid') are supported in this context
- C# - Linq : Unable to create a constant value of type Only primitive types or enumeration types are supported in this context.
- Linq, array.Contains() generating exception: Only primitive types ('such as Int32, String, and Guid') are supported in this context
- EF-Code First: Unable to create a constant value of type ''. Only primitive types ('such as Int32, String, and Guid') are supported in this context
More Query from same tag
- Read a file 2 by 2 lines using Linq
- Entity Framework: is there a complete list of supported IQueryable extension methods?
- Returning the innerlist from a custom collection inheriting from List<T>
- How to populate a TreeViewControl with hierarchy level?
- linq to sql Association problem with foreign keys
- Pass LINQ query to VIewBag to create DropDownList
- Combine 2 classes with adding data and 1 table has a colllection list of the other table and wanting to use linq to display
- Linq Match Array to List?
- How to use LINQ to retrieve child collection
- linq where clause causes exception
- Query items inside collection inside collection
- Change property based on condition
- Case statement in Linq for a nullable datetime field
- Remove Tag from xml file
- Converting VB.net lambda expression anonymous type result to known type
- Returning an error message if no resultes are found in LINQ query for model
- How to use LINQ to select and transform a subset of a List<T>
- comparing 2 lists of objects and return changes in the new list
- type ObjectQuery or DbQuery Error when updating a object
- How I can write something similar to Linq .Any() when writing sql server queries
- C# linq with server based database
- SharePoint Library Query running very slow
- LINQ to CheckBoxList data items
- Linq query returning same row 12 times
- linq2db "cannot be converted to sql" error
- How to group by a list of objects and declare this list as an attribute of a viewmodel
- LINQ to Entities does not recognize the method 'StaticMethod' method
- Does the order of LINQ functions matter?
- Entity Framework Linq to Sql: select from 2 different subqueries based on boolean condition
- Linq conditional select with null member collection