Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

Molonator69Mar 26 2019 — edited Oct 30 2019

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.

Comments
Post Details
Added on Mar 26 2019
2 comments
1,034 views