Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

Having Exception while inserting List of objects

Open saad2038 opened this issue 7 years ago • 5 comments

Hi, I'm having exception while inserting list of object. Exception is:

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: Must declare the scalar variable "@Capacity".

saad2038 avatar Apr 17 '17 08:04 saad2038

I had a similar issue. Show us your code. I might be able to help.

domingoladron avatar Aug 19 '17 21:08 domingoladron

have this same problem when inserting a list of objects and found no documentation on the wiki. it would be cool if this works.

topdev01 avatar Sep 15 '17 14:09 topdev01

You can try to specify the generic parameter like db.Insert<Animal>(animalList).

cyhnet avatar Nov 02 '17 08:11 cyhnet

Same here, in my case de mensage is: Must declare the scalar variable "@IsReadOnly".

lguzai avatar Feb 16 '20 23:02 lguzai

Can someone send some code so I can try to reproduce and include this on unit testing?

valfrid-ly avatar May 10 '21 14:05 valfrid-ly