我Unable to cast object of type 'System.Int64' to type 'System.Int32'上车:
item.ItemCount = reader.GetInt32(reader.GetOrdinal("amount"));
我试过了:
item.ItemCount = reader.GetInt64(reader.GetOrdinal("amount"));
但我得到了:
Error CS0266
Cannot implicitly convert type 'long' to 'int'.
An explicit conversion exists (are you missing a cast?)
该领域是bigint,这是我第一次使用 .Net。