Click here to Skip to main content
15,796,734 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I have EF core app, everything is ok, I made a model:

public class MyModel
    public int Id { get; set; }

    [Column(TypeName = "nvarchar(20)")]
    public string? Name { get; set; }

    [Column(TypeName = "nvarchar(20)")]
    public string? FamilyName { get; set; }

Did add-miggratiom , then update-database. And everything works OK in my c# ef core CRUD app, I update Database with the entity, and it is OK.

What I have tried:


If I manually insert Chinese characters into MyModel Table in MS SQL Server

  insert into MyModel ([Name], [FamilyName]) values('小美', '王')
then there are question marks:


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900