Problems to execute a DB function inside LINQ
Posted: Mon 10 Nov 2014 11:13
Hi,
I'm using dotConnect to access a database running on Oracle 11g. I have a db function (but the entity developer identified it as Stored Procedure) that I need to run inside a query. This function is already defined on Model.Store as the following image:
In one case I'm needing to build a linq that represents the following SQL:
SELECT FU_DOMN_DC(a.field1) from table1 a
I tried to provide this function with the following code segment:
AND
But the either approach raises an exception that devart can't translate the expression.
What am I doing wrong ?
Best regards.
I'm using dotConnect to access a database running on Oracle 11g. I have a db function (but the entity developer identified it as Stored Procedure) that I need to run inside a query. This function is already defined on Model.Store as the following image:
In one case I'm needing to build a linq that represents the following SQL:
SELECT FU_DOMN_DC(a.field1) from table1 a
I tried to provide this function with the following code segment:
Code: Select all
[DbFunction("TPIModel.Store", "FU_DOMN_DC")]
public static string FU_DOMN_DC(string dominio, string {
throw new PlatformNotSupportedException("Direct Calls are not supported");
}
Code: Select all
[EdmFunction("TPIModel.Store", "FU_DOMN_DC")]
public static string FU_DOMN_DC(string dominio, string valor)
{
throw new PlatformNotSupportedException("Direct Calls are not supported");
}
What am I doing wrong ?
Best regards.