I am working on an Asp.net MVC web application dealing with an Oracle database, and I have a statistics dashboard page.
I am using Entity Framework code-first with ODP.Net, but I am facing a performance issue on this page because Entity Framework queries are so complex.
So I have to convert my Entity Framework queries to stored procedures.
For example: I created the following stored procedure in Toad
CREATE OR REPLACE PROCEDURE Schema.DashBoardStatistics
(
-- Add the parameters for the stored procedure here
p_YearId number, cur OUT SYS_REFCURSOR
)
AS
BEGIN
-- select top 5 Fields By rating Rating
Open cur FOR Select * FROM Schema."Logs" where Schema."Logs"."Id"= p_YearId ;
END;
/
How to add another select to this Sp to return a dataset to my code?
And how can I call this from my code and receive this dataset in model classes?
Notice : i want to use entity framework query to execute stored procedure not ADO.NET To be able to map return dataset to my entities
Thanks!