1

for example:

public string Name { get; set;}
public string Comment { get; set;}

How to map Name with nvarchar(20) and map Comment with nvarchar(500)?

plantain
  • 43
  • 1
  • 8

1 Answers1

0

You can add Column

attribute like this;

[Column(DbType="NVarChar(20)")]
public string Name { get; set;}
[Column(DbType="NVarChar(500) NOT NULL")]
public string Comment { get; set;}

SQL-CLR Type Mapping

Ozan Yurtseven
  • 810
  • 8
  • 17