问题描述:

I can update using Npgsql without a problem if i have int,double,string, but with List it is not working. For example:

com.Parameters.Add(new Npgsql.NpgsqlParameter("@number", number));

works without problem. number is an integer.

com.Parameters.Add(new Npgsql.NpgsqlParameter("@booking", BookingTest));

BookingTest is of type List< Booking>. I get the error message:

Can't cast System.Collections.Generic.List'1[Booking] into any valid DbType

How can i cast correctly?

相关阅读:
Top