score:3
probably linq-to-entities doesn't support the code which you've written in productbymodelequalitycomparer
. you can call asenumerable
before calling distinct
, this will make distinct
executed via linq-to-objects but it won't be iqueryable
anymore:
var enumerable = query.asenumerable().distinct(new productbymodelequalitycomparer()); return query; }
Source: stackoverflow.com
Related Query
- LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method
- LINQ to Entities does not recognize the method 'System.String Format(System.String, System.Object, System.Object)'
- LINQ to Entities does not recognize the method Int32 get_Item(Int32)
- LINQ to Entities does not recognize the method 'System.TimeSpan Subtract(System.DateTime)' method
- LINQ to Entities does not recognize the method 'System.DateTime GetValueOrDefault()'
- Why LINQ to Entities does not recognize the method 'System.String ToString()?
- LINQ to Entities does not recognize the method 'System.Linq.IQueryable`
- LINQ to Entities does not recognize the method 'System.DateTime AddSeconds(Double)' method, and this method cannot be translated into
- LINQ to Entities does not recognize the method 'System.Object GetValue(...)'
- LINQ to Entities does not recognize the method 'Int32 Int32(System.String)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method ElementAt(i);
- LINQ to Entities does not recognize the method 'System.String StringConvert(System.Nullable`1[System.Double])
- LINQ to Entities does not recognize the method 'Int32 ToInt32(System.Object)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method
- LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method, and this method cannot be translated into a store expression
- LINQ to Entities does not recognize the method 'System.String get_Item(System.String)' method
- LINQ to Entities does not recognize the method 'System.String[] Split(Char[])' method,
- LINQ to Entities does not recognize the method 'System.String Format
- LINQ to Entities does not recognize the method Generic.List(int) to Generic.IEnumerable(int) method
- LINQ to Entities does not recognize the method exception
- LINQ to Entities does not recognize the method 'Method name' method
- LINQ to Entities does not recognize the method 'Int32
- LINQ to Entities does not recognize the method 'Boolean HasFlag(System.Enum)' when creating the expression via System.Linq.Expressions.Expression
- LINQ to Entities does not recognize the method 'System.Object Parse(System.Type, System.String)'
- LINQ to Entities does not recognize the method 'Newtonsoft.Json.Linq.JToken get_Item(System.String)' method,
- LINQ to Entities does not recognize the method 'System.Collections.Generic.Dictionary`2[System.Int32,System.String] ToDictionary
- LINQ to Entities does not recognize the method 'Boolean Exists(System.Predicate`1[Entities.Connection])' method
- error: LINQ to Entities does not recognize the method DataLength
- LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)'
More Query from same tag
- LINQ updating image
- How to convert this SQL to LINQ or Lambda expression?
- C# - how to split a string and filter some of its entries
- Why have a non-generic IQueryable?
- Fetching the value using Linq
- LINQ: System.Int32 is a non-nullable value type
- IEnumerable as Out Parameter
- is there a way to dynamically assign type to a generic linq expression?
- linq select where between dates
- EntityFramework and Spatial Search POINT inside POLYGON
- Using Group by with x amount of elements
- Error 1 Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)
- Linq to SQL Source in Microsoft ReferenceSource
- How to check for key-value pair mapping in this scenario?
- How to combine Linq query results
- Creating reduced json from a bigger json in c#
- C# How to GroupBy so that an item can be put into multiple groups
- Loop through an IEnumerable and pass them to a model with several if/else condition
- Linq to sql - generates wrong sql?
- Case Query in LINQ equivalent to sql query
- Creating Union fail with Entity framework
- Sorting collection
- Only check date condition when DateTime?(nullable?) using LINQ
- How to get all employees who may or may not have ParentID?
- What is the easiest way to seeing if there are any matches across a few DateTime arrays?
- Cannot convert lambda expression to type 'string' because it is not a delegate type
- filter data based on day, week and month
- Combine two list of decimals in one array
- unable to persist newly added tags in xml using LINQ
- DataBinding: 'System.Xml.linq.XElement' does not contain a property with the name 'colorName'