How can I create a field that is TEXT instead of NVARCHAR? Right now I've got
public string Text { get; set; }
But that always becomes a nvarchar column, I need a Text column
How can I create a field that is TEXT instead of NVARCHAR? Right now I've got
public string Text { get; set; }
But that always becomes a nvarchar column, I need a Text column
You can use System.ComponentModel.DataAnnotations.Schema.ColumnAttribute
[Column(TypeName = "text")]
public string Text { get; set; }
or via Fluent API:
modelBuilder.Entity<YourEntityTypeHere>()
.Property( e => e.Text)
.HasColumnType( "text" );