This question is locked. New answers and comments are not allowed.
Hello,
I tried to follow your example (http://www.telerik.com/help/openaccess-orm/openaccess-feature-ref-linq-support-querying-db-functions.html) on how to use scalar valued functions but every time i use the function in my linq query, i get a NotImplemented exception even though the documentation states that "You should not write any code for the domain method. You will use this method in LINQ queries and OpenAccess ORM will look for the attribute. The actual method will never be invoked"
I am using the new Openaccess version (Q3) with visual studio 2010 and SQL 2008.
My shared Function is declared as follows in my context :
I tried to follow your example (http://www.telerik.com/help/openaccess-orm/openaccess-feature-ref-linq-support-querying-db-functions.html) on how to use scalar valued functions but every time i use the function in my linq query, i get a NotImplemented exception even though the documentation states that "You should not write any code for the domain method. You will use this method in LINQ queries and OpenAccess ORM will look for the attribute. The actual method will never be invoked"
I am using the new Openaccess version (Q3) with visual studio 2010 and SQL 2008.
My shared Function is declared as follows in my context :
<MappedFunctionAttribute(Name:=
"[dbo].[DALTest]"
, IsDeterministic:=
False
, backend:=Telerik.OpenAccess.Metadata.Backend.MsSql)> _
Public
Shared
Function
DALTest(
ByVal
orderId
As
Integer
?)
As
System.Int16
Throw
New
NotImplementedException()
End
Function
My DALTest function is defined in my database as:And i am calling it in the following code:CREATE
FUNCTION
[dbo].[DALTest](@OrderId [
INT
])
RETURNS
INT
AS
BEGIN
RETURN
@OrderId;
END
;
GO
Using dbContext =
New
EntityDiagrams1()
Dim
query = (From order
In
dbContext.Accounts
Let
CRMStateID = EntityDiagrams1.DALTest(10)
Select
New
With
{.CRMID = CRMStateID})
MessageBox.Show(query.Count)
End
Using