I am using Visual Studio 2010, C#, Entity Framework 4 and Oracle 10g.
I need to be able to return the result of a database function as a scalar property of an anonymous
Use the Model.Store namespace:
public partial class LINQtest2Entities
{
[EdmFunction("LINQtest2Model.Store", "FNC_ADD")]
public decimal FNC_ADD(decimal V1, decimal V2)
{
// don’t need to implement the function
throw new ApplicationException();
}
}
In case you have provided the namespace correctly everything works smoothly.