# [Solved] Oracle EF Core - Execute Stored Procedure

T

#### Telen

##### Guest
Telen Asks: Oracle EF Core - Execute Stored Procedure
i'm in the process of migrating from asp.net WinForms to dotnetcore - which is entertaining in itself, I've got everything I need to start migrating some of our more basic apps, apart from how the world I execute Stored Procedures from Oracle.

All the examples that I've seen reference SqlServer, but the context (swapped to Oracle equivalents just doesn't seem to work). I'm missing something but not sure what.

EF Core performs CRUD operations and FromSqlRaw with no issue, but I cannot for whatever reason figure out what I'm missing to get the Stored Procedure to work.

The procedure runs when in Oracle.

The function takes the ID and returns the relevant code, nothing complicated.

Model

Code:
 [Keyless]
public partial class PRODUCT_CODE
{
[StringLength(20)]
public string? PRODUCT { get; set; }

}

DTO

Code:
 public class ProductCodeDto
{
[StringLength(20)]
public string? PRODUCT { get; set; }
}

Interface Call

Code:
 public Task<IEnumerable<ProductListDto>> GetProductCode(int Id);

Repository

Code:
  public async Task<IEnumerable<ProductListDto>> GetProductCode(int Id)
{

OracleParameter paramId = new OracleParameter("vId", Id);
OracleParameter paramReturn = new OracleParameter("return", OracleDbType.Varchar2, 20, ParameterDirection.Output);

string sql = ("BEGIN SCHEMA.GET_PRODUCT_CODE(:vId); END;");
var product = _db.PRODUCT_LISTS.FromSqlRaw(sql, paramId).ToList();

return _mapper.Map<IEnumerable<PRODUCT_LIST>, IEnumerable<ProductListDto>>(product);
}

The error message that I get when ran is

Code:
PLS-00221: 'GET_PRODUCT_CODE' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at OracleInternal.ServiceObjects.OracleConnectionImpl.VerifyExecution(Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, SqlStatementType sqlStatementType, Int32 arrayBindCount, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, Int64 internalInitialJSONFS, OracleException& exceptionForArrayBindDML, OracleConnection connection, IEnumerable1 adrianParsedStmt, Boolean isDescribeOnly, Boolean isFromEF)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.EntityFrameworkCore.Storage.Internal.OracleExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Query.Internal.FromSqlQueryingEnumerable1.Enumerator.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at OracleTestApp_Repository.Repository.ProductListRepository.GetProductCode(Int32 Id) in C:\Users\VEL017\Documents\Core5\OracleTestApp\OracleTestApp_Repository\Repository\ProductListRepository.cs:line 94
at OracleTestApp_Server.Pages.ProductList.ProductIndividual.SearchButton() in C:\Users\VEL017\Documents\Core5\OracleTestApp\OracleTestApp\Pages\ProductList\ProductIndividual.razor:line 128
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

#### What Is ITIL® v4?

Lora Goody Asks: What Is ITIL® v4?
Specialist in ITIL 4: Adding Value for Stakeholders Expert in Directing, Planning, and Improving ITIL 4 Strategy at High Speed. These lessons will be used by IT professionals who require the technical and practical know-how to oversee dependable IT-enabled teams, services, and workflows. If you want to become an ITIL 4 Strategic Leader or Managing Professional, you must complete all the modules. After doing so, you will have a much better understanding of ITIL and be able to use it successfully.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### [Solved] Count points in a grid

• Aryan Irani
• Geography
• Replies: 0
***** Irani Asks: Count points in a grid
I have a grid that I have created and a path that is there. I want to calculate the number of points each grid has or I want to calculate the number of points each slab or rectangle has.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

#### [Solved] Delete polygons from layer 1 with polygons from layer 2 based on a common attribute between both layers

• epcardiel
• Geography
• Replies: 0
epcardiel Asks: Delete polygons from layer 1 with polygons from layer 2 based on a common attribute between both layers
I have two layers with a large number of polygons. Layer 1 are the polygons I want to crop (green border) and layer 2 are the clipping polygons (red border). Both layers have a common identifier in layer 1 is ID_1 and in layer 2 is ID_2.

The result should be that the polygon of layer 1 with ID_1 =1 is clipped by the polygon of layer 2 with ID_2=1 and so on with all matching polygons.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

#### [Solved] (GEE) constant value after applying scaling factor to LANDSAT

N_LLC Asks: (GEE) constant value after applying scaling factor to LANDSAT
After applying a scaling factor to my LANDSAT collection 2 level 2 data the values seem to be off.

Code:
var addNDVI = function(image) {
var ndvi = image.normalizedDifference(['SR_B4', 'SR_B5']).rename('NDVI');
};

var collection1 = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
.filterBounds(sch)
.filterDate('2013-01-01', '2023-01-01')
.select(['SR_B4', 'SR_B5'])

collection1 = collection1.map(
function(img){
.rename('NDVI_rescaled')
}
);

var series1 = ui.Chart.image.seriesByRegion(
collection1, sch, ee.Reducer.mean(), 'NDVI_rescaled', 30, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({
title: 'L5_SCH_1984-01-01_1986-12-31',
vAxis: {title: 'NDVI'},
lineWidth: 1,
pointSize: 4,
});

print(series1);
//var palette = {min: -1, max: 1, palette: ['blue', 'white', 'green']};
Map.addLayer(collection1);

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

#### Parallel transport in curved spacetime

• Tanmoy Pati
• Physics
• Replies: 0
Tanmoy Pati Asks: Parallel transport in curved spacetime
This is sort of a very introductory question and I am not finding any reference regarding this. And let me know whether my answer is correct or not.

For example, we are parallelly transporting a vector on a surface (intrinsic parallel transport). We take two points and join by a curve and we will do the procedure along the curve. In terms of intrinsic coordinates $P=P(u)$ and $Q=Q(u+du)$. From $P(u)$ if we transport a vector, parallelly, the important condition is $$\nabla_i V^j=0\\ \text{or}, \quad \partial_iV^j=-\Gamma^j_{ik}V^k\\ \text{or,} \quad V_\parallel^j(u+du)=V_\parallel^j(u)-\Gamma^j_{ik}V_\parallel^k(u) du^i+\mathcal{O}(du^2)$$ This transport is done in one path. If we take another path to do the same operation, if $R^a_{bcd} \neq 0$, we will get two different answers for the transported vector component at $Q(u+du)$. So, from the eqn how to interpret this? In particular, there should be some terms which will make $V_\parallel^j(u+du)$ different from one path to another.

Note: These changed $V_\parallel^j(u+du)$ will not make the vector from the point of view of the surface different, since the basis vector also have derivative and have $\Gamma$'s which can cancel the contributions from these $du^n$ terms.

One soln I was thinking, if we take a normal coordinate, for instance, $\Gamma$'s will vanish but $\partial \Gamma$'s will not vanish, hence they actually carry the information of curvature of the manifold. Hence to see actually $V_\parallel^j(u+du)$ are different at different paths, we have to expand upto $du^2$ at least.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### What happens with the tip vortices of two aircraft flying in the opposite direction?

• lWindy
• Physics
• Replies: 0
lWindy Asks: What happens with the tip vortices of two aircraft flying in the opposite direction?
Suppose that an aircraft flies with its wing through an tip vortex of another aircraft which flew in the opposite direction. Suppose that the shed wing tip vortex of both aircraft are exactly the same in strength, only rotating in opposite direction?

What will the net effect be? Will the angular momentum be canceled?

I would like to place this in the light of the existence of a root vortex experienced by wind turbines. From Burton's Wind Energy Handbook (3rd edition, p78) :

" For example, on a two blade rotor, unlike an aircraft wing, the bound circulations on the two blades shown in Figure 3.27 are opposite in sign and so combine in the idealised case of the blade root being at the rotational axis to shed a straight line vortex along the axis with strength equal to the blade circulation times the number of blades. "

With the aircraft example the circulation is opposite in sign as well. So why is the root vortex a summation of the two blades instead of cancellation?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### Does parallelism of cardinal comparison between sets and their power sets, enact a form of choice?

• Zuhair Al-Johar
• Mathematics
• Replies: 0
Zuhair Al-Johar Asks: Does parallelism of cardinal comparison between sets and their power sets, enact a form of choice?
Let $*$ range over cardinal relations $\{<,=,>, <>\}$, if we add the following axiom to $\sf ZF$, would that prove a known form of choice?

Parallelism: $\forall x \forall y \, ( |x| * |y| \leftrightarrow |\mathcal P(x)| * |\mathcal P| )$

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.