How to resolve sort conflicts using Entity Framework?

My EF model retrieves data from a database that has a view that retrieves data from linkedserver. The database mapping in the link server has been changed to SQL_Latin1_General_CP1_CI_AS, but not to the servers. I assume that this is where the conflict of matching occurs. Every time I connect to this view, I keep getting this error:

"Cannot resolve sort conflict between \" SQL_Latin1_General_CP1_CI_AS \ "and \" Modern_Spanish_CI_AS \ "in equal action."

I found that sorting problems are easily solved in SQL using COLLATE. I cannot find a way to do this using LINQ. Can LINQ be used for this or should I solve this problem differently?

+5
source share
1 answer

I understand that EF does not support this feature.

You can create a new view to resolve the conflict and request a new view using EF.

+2
source

Source: https://habr.com/ru/post/958381/


All Articles