I've got a huge problem. I use dapper as micro orm in my project and when I make a query with stored procedure in package IT WORKS (but only the first time, after second and third the same query, same parameters and same execution returns nothing). After while, that query works again, but still only for one time same as before.
But when I do the same query from database (in sqldeveloper) it always works So I claim that a problem is connected with dapper. I guess.
I have no idea how to fix this. I have changed that procedure to a function but effect is still the same. I work on OracleDb, in asp MVC ofc.
The execution of procedure is :
var Parm = new OracleDynamicParameters(); Parm.Add("refCur", OracleDbType.RefCursor, ParameterDirection.Output); Parm.Add(name: "ID", value: id, direction: ParameterDirection.Input); return con.Query<SAMPLE_MODEL>("SAMPLE_PACKAGE.SAMPLE_PROC", Parm, commandType: CommandType.StoredProcedure).ToList();
Check that every session got a unit id. Every query which uses a dblink requires a new session id with the database.