Search for existing suggestions

ADO.NET Entity Data Model Template generate property(POCO) should add Column TypeName = "NVARCHAR" from Database

ADO.NET Entity Data Model Template generate property(POCO) should add Column TypeName = "NVARCHAR" from Database

@Database
CREATE TABLE Test.dbo.Test (
Id INT IDENTITY
,Name NVARCHAR(50) NOT NULL
,CONSTRAINT [PK_dbo.test] PRIMARY KEY CLUSTERED (Id)
) ON [PRIMARY]
GO

@POCO (via ADO.NET Entity Data Model Template Generated)
[Table("Test")]
public partial class Test
{
public int Id { get; set; }

[Required]
[StringLength(50)]
public string Name { get; set; }
}

Can you add attribute of [Column(TypeName = "NVARCHAR")] ?

[Table("Test")]
public partial class Test
{
public int Id { get; set; }

[Required]
[StringLength(50)]
[Column(TypeName = "NVARCHAR")]
public string Name { get; set; }
}

Otherwise, If I via Code First generate DB,I can not write Chinese.

1 vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)

We’ll send you updates on this idea

余小章 shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

4 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base