How do I get fluent nhibernate to create a varbinary(max) field in sql server

后端 未结 6 571
臣服心动
臣服心动 2020-12-06 17:00

How can I get fluent nhibernate to create a varbinary field in a sql server 2005 table that uses a field size of varbinary(max)? At the moment I always get a default of varb

6条回答
  •  执笔经年
    2020-12-06 17:43

    I'm not sure why your ActiveRecord example is not working, but there you might try setting the length of the column.

    With Fluent NHibernate, you should be able to do

    Map(x => x.FileData)
        .WithLengthOf(2147483647)
    

提交回复
热议问题