manticohd
manticohd

Reputation: 23

Insert Unicode string to SQL Server using linq

I have a table with column Name is nvarchar

In SQL statement i using N prefix to save data with Unicode

Insert into TBL_Name (Name) values(N'Hôm nay đẹp trời')

it's work fine. But i don't know how to save unicode string when using Linq?

Please help me.

Thanks so much!

Upvotes: 0

Views: 618

Answers (1)

teo van kot
teo van kot

Reputation: 12491

N prefix mean string literal will be unicode.

When you use LinQ on nvarchar field LinQ already knows that your string will be Unicode. So you don't need to do anything else.

Upvotes: 1

Related Questions