开发者

MigratorDotNet and Text Datatype on SQL Server 2008

开发者 https://www.devze.com 2023-01-13 18:26 出处:网络
I am using migratordotnet to sync my SQLServer 2008 database and need to create a column of type Text...

I am using migratordotnet to sync my SQLServer 2008 database and need to create a column of type Text...

Am at a bit of a loss as to how to do this, as there is no System.Data.DbType.Te开发者_高级运维xt??


Worked it out with some trial and error...

DbType of AnsiString and a length of int.MaxValue does the trick

Database.AddColumn("Notification", "Body", DbType.AnsiString, int.MaxValue);

0

精彩评论

暂无评论...
验证码 换一张
取 消