Skip to content
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

Varchar column sending unicode #8370

Closed
mk9753 opened this issue May 3, 2017 · 1 comment
Closed

Varchar column sending unicode #8370

mk9753 opened this issue May 3, 2017 · 1 comment

Comments

@mk9753
Copy link

mk9753 commented May 3, 2017

I think I'm coming across something related to this issue...
There is a column set up as varchar:
modelBuilder.Entity<Quotes>().Property(s => s.StripInsuredCorporationName).HasColumnType("varchar(500)");

Query:
var tmp = (from q in context.Quotes where (q.StripInsuredCorporationName.Contains(strippedName)) select new { q.QuoteID });

The resulting SQL:
SELECT [q].[QuoteID] FROM [tblQuotes] AS [q] WHERE CHARINDEX(N'Test', [q].[StripInsuredCorporationName]) > 0

Since the column is defined as varchar, not sure what is causing the N to be there.
Thanks

Further technical details

EF Core version: 1.1.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Win 10
IDE: VS 2017

@smitpatel
Copy link
Contributor

Added #4978 (comment) to existing issue. Closing as dupe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants