-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EF Core 1.0 RTM not filtering properly on fields of type char #5975
Comments
If my filter, instead |
The issue is that we are using the datatype from |
You could try this as a workaround... |
refact of hashes EF DBcontext optimiations (dotnet/efcore#5975)
refact of hashes EF DBcontext optimiations (dotnet/efcore#5975) Environment.Machine name for docker-compose load balancing
refact of hashes EF DBcontext optimiations (dotnet/efcore#5975) Environment.Machine name for docker-compose load balancing
At least on SQL Server, when we create string parameters we should use the variable length flavors of the types e.g. |
Note that this is likely to impact many databases and providers, but I am not sure there is common implementation code where we could fix it. We can add tests to help providers do the same. |
refact of hashes EF DBcontext optimiations (dotnet/efcore#5975) Environment.Machine name for docker-compose load balancing
Steps to reproduce
I have created a Github project for this issue
https://github.com/iberodev/EntityFramework5975
The issue
Suppose I have a Port entity
and the field Code has a
char(5)
type.and the following data:
Code Name
AUCNB Canberra
AUMLB Melbourne
AUSYD Sydney
NZAKL Auckland
NZTRG Tauranga
if I use Entity to retrieve rows based on a filter (eg: the word
NZ
to retrieve only ports whose code starts withNZ
), the SQL query Entity generates does not return any results from database.Notice the question mark instead the
NZ
text when generating the SQL statement. Is that normal?This was working fine in EF Core RC2.
Also notice that if instead CHAR(5), my code column is NVARCHAR(5) everything works well.
Further technical details
EF Core version: 1.0.0
Operating system: Windows 10
Visual Studio version: VS2015 update 3
The text was updated successfully, but these errors were encountered: