I have the following interface:
IEnumerator<SqlDataRecord> IEnumerable<SqlDataRecord>.GetEnumerator()
{
var SQLRow = new SqlDataRecord(
new SqlMetaData("id", SqlDbType.BigInt),
new SqlMetaData("image", SqlDbType.Image));
foreach (ImageModel item in this)
{
SQLRow.SetSqlInt64(0, item.Id);
// here is the problem (this is a byte[] variable)
SQLRow.SetSqlByte(1, item.Image);
yield return SQLRow;
}
}
So how can i map the byte[]
to Image
? Or maybe i can store the image in a different way?
Thank you.