my DAL is something like this:
Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>();
mylist = db.ExecuteSprocAccessor<EMyClass>("spMySP", param1, param2).ToList();
my SP in SQL-SEVER returns 4 normal fields plus a varbinary field that is an image
my EMyClass is:
public class EMyClass
{
public int aaa { get; set; }
public int bbb { get; set; }
public byte[] ccc { get; set; }
public string ddd { get; set; }
public string eee { get; set; }
}
At the WCF client i can see the normal data from any row returned by the query, but the varbinary field (image) is always null, when i execute the same query at the sql manager i can see the varbinary field with the image data. The varbinary field is supposed to map to the ccc property of the class.
Thanks in advance
i know, it could be the worst approach but at least its working -_-
foreach (EMyClass obj in mylist)
obj.ccc = (byte[])db.ExecuteScalar("spReturnImage", obj.aaa);