Met de vloeiende api kun je IsFixedLength():
. gebruiken//Set StudentName column size to 50 and change datatype to nchar
//IsFixedLength() change datatype from nvarchar to nchar
modelBuilder.Entity<Student>()
.Property(p => p.StudentName)
.HasMaxLength(50).IsFixedLength();
Met annotaties kunt u het type dicteren:
[Column(TypeName = "char")]
[StringLength(2)]
public string MyCharField { get; set; }