NHibernate How to specify custom sql type only in production
- by Davide Orazio Montersino
I am saving binary files into a Sql Server 2005 Db using Fluent NHibernate.
However, I am using SQLite to run my (pseudo) Unit Tests.
I need to use a custom Sql type for Ms Sql, but it would throw an error on SqlLite. What strategies can I use?
This is the Map file:
public class BinaryFile
{
public BinaryFile()
{
m.Map(x => x.BinaryData);//.CustomSqlType("varbinary(MAX)");
m.Map(x => x.ContentType);
m.Map(x => x.FileName);
m.Map(x => x.FileSize);
}
}