I get the error:
The type 'System.Int32[]' must declare a default (parameterless) constructor in order to be constructed during mapping.
With the code:
var gamePlayRecord = db.ExecuteQuery<int[]>("SELECT UserID, IPID, GameID FROM ArcadeGames WHERE ID = " + gamePlayRecordID).Single();
var userID = gamePlayRecord[0];
var ipID = gamePlayRecord[1];
var gameID = gamePlayRecord[2];
I know this is wrong, but can someone show me how to do it correctly without needing to create a new object preferably?
Best Answer
Result of this query is not
int[]
but one row with numbers.not good solution: use for every number:
or Create sql query
or Create class ...