score:0
you could make the query a bit easier, and avoid the issue, and i think this should "work":
from a in dc.contentlist
where a.contentid != null
select new { id = a.contentid, a.priceclass, .. }).union(
from b in dc.contentlist
where dc.contentlist.firstordefault(a => a.contentid == b.contentid) == null)
select new { id = b.contentid, b.priceclass, .. });
score:1
could you please check your table with sp_help to see if there is a different collation in the columns.
there is also a very through explanation on that issue here
Source: stackoverflow.com
Related Query
- Strange collation issue using LINQ to SQL
- Using collation in Linq to Sql
- LINQ to SQL bug (or very strange feature) when using IQueryable, foreach, and multiple Where
- How to call an Sql User defined Function using Entity frame work Code first approach with LInq c#
- Convert string[] to int[] in one line of code using LINQ
- LINQ to SQL using GROUP BY and COUNT(DISTINCT)
- Will using LINQ to SQL help prevent SQL injection
- How are people unit testing code that uses Linq to SQL
- Update using LINQ to SQL
- linq to sql join on multiple columns using lambda
- LINQ to SQL query using "NOT IN"
- How to Connect to SQL Server using LINQ to SQL?
- Steps for a beginner to run very basic linq to sql query using Linqpad
- Why didn't the LINQ designers stick with using the way sql is written today?
- Linq to SQL using group By, and order by count
- Equivalent of SQL Between Statement Using Linq or a Lambda expression
- Ignoring accents in SQL Server using LINQ to SQL
- Using LINQ to SQL with Oracle
- Using text SQL with LINQ
- SQL Query to LINQ syntax using not exist and join
- Dynamic query using LINQ to SQL
- Eager-loading using LINQ to SQL with Include()
- Dynamic linq query expression tree for sql IN clause using Entity framework
- LINQ to SQL . how to select all record using .take()
- How to make a right join using LINQ to SQL & C#?
- Left outer join using LINQ -- understanding the code
- How to reuse a linq expression for 'Where' when using multiple source tables
- Good way to time SQL queries when using Linq to SQL
- Using " Is NULL/not NULL" in LINQ To SQL
- Avoiding code repetition when using LINQ
More Query from same tag
- Does Select linq function preserve List collection order?
- NHibernate Overcoming NotSupportedException
- LINQ GroupBy - Select lowest ID group by name
- Order by child record value(s) that can be empty
- Is there a way of adapting this function so it doesn't use LINQ? (convert byte array to string)
- Using Group By on Date Time field - Linq query
- Search Xml file with Linq, get nodes that match to subnodes
- How should I extract a collection of distinct values from a List<T> of custom objects?
- Position of .Take() has no effect on generated SQL
- How to return all values of a column as null except one column value in LINQ?
- How to create a lookup from list of lists using Linq?
- LINQ-to-Json or String-to-Json
- MVC ASP 3 table join then display results
- Group by single element, putting in a list some row
- order datatable by relevance using linq by column values which are comma sperated
- LINQ expression that will match multiple bulk inputs
- How to use arrays for comparisons using lambdas in C#
- Splitting C# string into 3 word chunks using regex or other method
- Any way to read a CSV into an array or datatable using linq?
- EF Core: The LINQ expression could not be translated - Net Core 3.1
- LINQ to SQL: Selecting Name (string) by id (smallint)
- List select range of objects based on property value
- Turning SQL into LINQ Query C# mvc
- Exclude multiple items from SelectList in mvc
- mvc3 dapper No mapping exists from model
- Dynamically composing LINQ expressions
- Linq to XML navigation problem
- Convert sql to linq with STRING_AGG
- How to parametrize a query in Entity Framework?
- Linq Custom sorting in ORDER BY and rest of result order by asc