因为数据需要存储德语,需要unicode编码,字段类型设置为nvarchar类型了,但是sql 语句insert的时候需要在参数前面带一个N,这个用EF可以实现吗?
相关问题
- How to add sender name before sender address in py
- Android: Using Intent to send email - only offerin
- Verify if an email address exists or not
- How can I add condition on mail notification larav
- My email signature will not appear when generating
相关文章
- How do I make a forward e-mail link?
- Debug HTML Email in Gmail App
- Sending email using php, gmail, and swiftmailer ca
- Android - getting an error “no application can per
- How can the Return-Path header be different than t
- Regex Email - Ignore leading and trailing spaces?
- Sending mail with ASP.Net vNext
- TFS email notification
可以直接数据库跟踪一下EF执行的SQL语句看看
你这个是varchar类型.
得要是nvarcahr类型.
你用ef的属性绑定.
builder.Entity<实体类>().Property(a => a.AnotherName).HasMaxLength(64).IsUnicode()
这样试试.
其实我想问的是编码问题,只要把数据库类型改为nvarchar就可以了,我忘记了更新EF模型,不过不更新模型自己写的sql语句带N也不会出现乱码.
记得EF默认就会加上
N