EF Core beta 2: How call scalar function (DbFunction) ? — oracle-tech

    Forum Stats

  • 3,715,657 Users
  • 2,242,821 Discussions
  • 7,845,481 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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

Molonator69
Molonator69 Member Posts: 7
edited October 2019 in ODP.NET

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.

Answers

Sign In or Register to comment.