views:

814

answers:

1

Hi,

I have an array of bytes in my C# class, and need to persist it into a SQL Server 2005 database using NHibernate. What SQL data type should I use for the column, and how do I got about using NHiberante to do the persistance for me? If the answer is a custom NHibernate type, is there any sample code knicking around to do this?

Would it just be easier to convert the byte array to a string and persist it in a varcahr column?

+1  A: 

BinaryBlob should generate the proper VarBinary column for you.

Stu