Moq.Dapper
Moq.Dapper copied to clipboard
QueryAsync with multiple types does not work
`var results = await connection.QueryAsync( "[dbo].[GetSomething]", types: new[] { typeof(Something), typeof(ASubThing), typeof(AnotherSubThing) }, map: objects => { var result = objects[0] as Something?? new Something();
result.FirstSubThing= objects[1] as ASubThing?? new ASubThing();
result.SecondSubThing= objects[2] as AnotherSubThing?? new AnotherSubThing();
return result;
},
dbArgs,
commandType: CommandType.StoredProcedure);`
moq.dapper continues to give an error saying that (When using the multi-mapping APIs ensure you set the splitOn param if you have keys other than Id (Parameter 'splitOn') even though the code works fine when the api is running.