I have a query in which I have to select Data which is of type byte.
byte[] data
My query is as follows:
private IEnumerable<dynamic> GetData(int fileID){
return Connection.db.Query<dynamic>("select Data from [File] where id = @0", fileID.ToString());
}
byte[] actual = file.GetData();
and I want to find the length as follows:
actual.Length
The problem with the above is that I have to find the length but GetData returns a dynamic object actual.
How can I retrieve the Data and have its length?
Is there a better way to query byte[] in PetaPoco?
I just tried this:
where bytetable is defined:
and it works as expected.
The data variable is indeed a byte[].