Anupam- / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

System.Data.Linq.Binary type #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have following class definition (.NET version 3.5):

public class Document
{
    Binary Report { get; set; }

    //other fields
}

In the database table (MS SQL Server 2008) Report field has image data type. 
I'm trying execute connection.Query<Document> method and I'm having exception 
like this: System.InvalidCastException: cannot cast object of type Syste.Byte[] 
to type System.Data.Linq.Binary.
So I can't use SqlMapper with Binary type? Or maybe I'm doing something wrong?

Original issue reported on code.google.com by pashag...@gmail.com on 17 Jun 2011 at 1:04

GoogleCodeExporter commented 9 years ago
I think we should support this, since that is how L2S will present this data. 
I'll patch this when I can (am laying floor this weekend, so not at PC)

Original comment by marc.gravell on 17 Jun 2011 at 2:43

GoogleCodeExporter commented 9 years ago

Original comment by marc.gravell on 19 Jul 2011 at 6:15