2 Replies Latest reply on May 10, 2019 5:37 PM by Alex Keh - Product Manager-Oracle

    EF Core beta 2: How call scalar function (DbFunction) ?

    Molonator69

      HI.

       

      How call a scarlar function db with EF Core2 in a package?.

       

      1.- If I have the function "TEST_FUNCTION" in the schema "test", it´s work:

       

      [DbFunction(FunctionName = "TEST_FUNCTION", Schema = "test")]

      public static int testFunc(String val)

      {

          throw new NotImplementedException();

      }

       

      But if the function is in a package "PK_NAME", don´t work, and return ORA-00904: "test"."PK_NAME.TEST_FUNCTION": invalid identifier

       

      [DbFunction(FunctionName = "PK_NAME.TEST_FUNCTION", Schema = "test")]

      public static int testFunc(String val)

      {

          throw new NotImplementedException();

      }

       

      or

       

      [DbFunction(FunctionName = "TEST_FUNCTION", Schema = "test.PK_NAME")]

      public static int testFunc(String val)

      {

          throw new NotImplementedException();

      }

       

       

      Any idea?.

       

      I don´t find any example of this.