2 Replies Latest reply on Oct 5, 2012 12:38 PM by 966155

    Entityframework 5 codefirst and Oracel SP

      I am trying to call an Oracle SP from my Asp.net application which uses the Entity Framework Code-First approach.
      This SP has 4 i/p paramaters and a ref_cursor O/p paramater.
      Can you pls help me in getting started by giving some pointers on how I should be doing this?How do I pass parameters and get teh results in a list.
      This i what i tried till now: but i get an error "Invalid SQL"

      using Oracle.DataAccess;
      using Oracle.DataAccess.Client;

      OracleParameter outParam = new OracleParameter();
      outParam.ParameterName = "FIRST_NAME_IN";
      outParam.OracleDbType = OracleDbType.Varchar2;
      outParam.Size = 25;
      outParam.Direction = System.Data.ParameterDirection.Input;

      var data = db.Database.SqlQuery<User>("EXEC SP_TEST").ToList();

      Pls help me on this...