Oracle数据库:使用EFCore返回DataSet/DataTable数据表
Oracle数据库:使用EFCore返回DataSet/DataTable数据表
返回DataTable
C# 全选
var p1 = db.CreateParameter("PARAM1", "code1");
var p2 = db.CreateParameter("PARAM2", "code2");
var p3 = db.CreateParameter("PARAM3", DateTime.Today);
var p4 = db.CreateOracleCursor("OUTPUT_CURSOR");
var data = db.GetDataTable("USP_TEST", CommandType.StoredProcedure, p1, p2, p3, p4);
SQL 全选
create or replace PROCEDURE USP_TEST
(
PARAM1 IN VARCHAR,
PARAM2 IN VARCHAR,
PARAM3 IN DATE,
OUTPUT_CURSOR OUT SYS_REFCURSOR
) AS
BEGIN
OPEN OUTPUT_CURSOR FOR SELECT * FROM "tb_AR";
END USP_TEST;
返回DataSet
C# 全选
var p1 = db.CreateParameter("PARAM1", "code1");
var p2 = db.CreateParameter("PARAM2", "code2");
var p3 = db.CreateParameter("PARAM3", DateTime.Today);
var p4 = db.CreateOracleCursor("OUTPUT_CURSOR1");
var p5 = db.CreateOracleCursor("OUTPUT_CURSOR2");
var data = db.GetDataSet("USP_TEST_DATASET", CommandType.StoredProcedure, p1, p2, p3, p4, p5);
SQL 全选
create or replace PROCEDURE USP_TEST_DATASET
(
PARAM1 IN VARCHAR,
PARAM2 IN VARCHAR,
PARAM3 IN DATE,
OUTPUT_CURSOR1 OUT SYS_REFCURSOR,
OUTPUT_CURSOR2 OUT SYS_REFCURSOR
) AS
BEGIN
OPEN OUTPUT_CURSOR1 FOR SELECT * FROM "tb_AR";
OPEN OUTPUT_CURSOR2 FOR SELECT * FROM "tb_ARs";
END USP_TEST_DATASET;
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
CSFramework.EF C/S框架网