-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
I could use some help inserting binary data.
The database I'm using is sql server 2014. The column i'm trying to insert som bytes into looks like this:
[BinaryData]varbinary NULL,
In my code the property looks like this:
public byte?[] BinaryData { get; set; }
I'm simply inserting this using
dbAdapter.Insert("MyTable", entity);
but when It's inserted I get this exception "Implicit conversion from data type nvarchar to varbinary(max) is not allowed".
If I comment out the binary property everything works just fine.
I've tried adding the Column annotation like this on the property in my code but that didnt help.
[Column(“BinaryData", TypeName="varbinary")]
Some help would be much appreciated.