实体框架4 UNI code节能问题 [英] entity framework 4 unicode problem saving
问题描述
我使用的是实体框架4的MySQL连接器6.3.6有问题。我做了MySQL的dabase为utf8 - 默认排序规则使用UNI code在我的网站。问题是,我可以当我尝试使用实体框架4它把问号在我的数据库来保存单向code字符串读UNI code到我的网站从数据库中。我甚至从Visual Studio设计,但无济于事建立统一code属性。我缺少的东西,还是有你需要做的,使实体框架写单code到数据库的东西吗?
I am having problem using the Entity Framework 4 with MySQL connector 6.3.6. I have made MySQL dabase to utf8 - default collation to use the unicode on my website. The problem is that I can read the unicode to my website from the database by when I try to save the unicode string using entity framework 4 it put question marks on my database. I even set up the Unicode property from the Visual Studio designer but to no avail. Am I missing something or is there something you have to do to make entity framework write unicode to the database?
推荐答案
确定的研究后,很多原来,MySQL连接器6.3.6有一个连接字符串参数的charset = UTF8'。你需要添加到您的连接字符串。
Ok after alot of research it turns out that the MySQL connector 6.3.6 got a connection string parameter 'charset=utf8'. you need to add this to your connection string.
这篇关于实体框架4 UNI code节能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!