From a stored procedure, I return a list int- just like
SELECT ID FROM Table
It uses a dapper. The following is an attempt at what I'm trying to do. I can fill the object using the same approach but not the objectint
List<int> ids = new List<int>();
int id = 0;
ids = connection.Query("storedprocedure", param, transaction: transaction, commandType: CommandType.StoredProcedure).Select(row => new int { id = row.ID }).ToList();
I believe that this is somehow related to => new intthe end of the statement. I am sure the solution is quite simple. just one of them on Fridays.
source
share