我想通过 Oracle.ManagedDataAccess.Core(Odp.Net Core)将用户定义的类型或具有类型的关联数组传递给 dotnet 核心中的存储过程。但我找不到任何明确的例子。
Odp.net Core 是否支持用户定义类型或关联数组类型,我不知道。
这是我的类型;
TYPE TYP_BC_RECORD is record (
unique_id depo.bc_stok_har.unique_id%type,
transaction_hash depo.bc_stok_har.transaction_hash%type,
transaction_error depo.bc_stok_har.transaction_error%type
);
TYPE TABLE_TYPE_BCRECORD IS TABLE OF TYP_BC_RECORD;
存储过程参数;
PROCEDURE P_SetResultBcHksRecordList(arBC_RECORD TABLE_TYPE_BCRECORD);
和dotnet核心代码;
OracleCommand OCommAPI = new
OracleCommand("Depo.SPHKSBLOCKCHAIN.P_SetResultBcHksRecordList", conn);
OCommAPI.CommandType = CommandType.StoredProcedure;
OracleParameter arBC_RECORD = new OracleParameter
{
OracleDbType = ?,
ParameterName = "arBC_RECORD ",
//I don't know what I suppossed to write here. ?
//RetUniqueID.Value = item;
Direction = ParameterDirection.Input
};
CommAPI.Parameters.Add(arBC_RECORD);
.
.
.