Unicode with Entity Framework

后端 未结 1 1243
予麋鹿
予麋鹿 2021-01-18 02:03

I have a table with nvarchar field (MS SQL Server 2008 R2). For testing, this code works fine:

Update [Screenshots] set name=N\'Значение\' where id=230246


        
相关标签:
1条回答
  • 2021-01-18 02:40
    1. Are you sure that formData.Get("description") returns UTF-8 string (that it isn't converted somewhere)?

    2. What is your approach in entity framework? Code-first/Design-first/Database-first?
      Try to remove database and recreate - remove database and then in designer right click -> Generate database from model...

    3. Get Entity Framework Profiler from Nu-get package manager and see what query is sending to database.

    0 讨论(0)
提交回复
热议问题