Open GoogleCodeExporter opened 9 years ago
Additionally in LinqEntityBase.Generated
I have got an issue inside the Function:
Protected Shared Function Detach(Of TEntity As LinqEntityBase)
with:
LateBinder.SetField(entitySet, "isLoaded", true)
VS2010 claims:
Error 19 'LateBinder' is not declared. It may be inaccessible due to its
protection level. C:\Development\Visual Studio
2010\Projects\WindowsApplicationTest\TEST.Data\LinqEntityBase.Generated.vb 112 1
3 TEST.Data
Original comment by schaffn...@GMX.de
on 22 Nov 2011 at 10:07
[deleted comment]
In C# LinqEntityBase.Generated.cs
is:
using CodeSmith.Core.Reflection
but VS 2010 states:
Error 8 The type or namespace name 'Core' does not exist in the namespace
'CodeSmith' (are you missing an assembly
reference?) C:\Development\CodeSmith\Templates\PLINQO\Nrg2390_C#\Test.Data\LinqE
ntityBase.Generated.cs
this import is missing in VB.NET
which might cause the problem with "LateBinder"
Original comment by schaffn...@GMX.de
on 23 Nov 2011 at 10:12
OK I investigated the first issue. the Syntax needs to be changed for VB.NET
I will add an example:
Plinqo Syntax:
''' <summary>Method that is mapped to the dbo.fn_iso_week_number database procedure.</summary>
''' <returns></returns>
<System.Data.Linq.Mapping.Function(Name:="dbo.fn_iso_week_number", IsComposable:=true)> _
<return: System.Data.Linq.Mapping.Parameter(DbType := "int")> _
<System.CodeDom.Compiler.GeneratedCode("CodeSmith", "6.0.0.0")> _
Public Function FnIsoWeekNumber( _
<System.Data.Linq.Mapping.Parameter(Name:="@date", DbType:="datetime")> ByVal [Date] As Date?) As Integer
Dim methodInfo = DirectCast(System.Reflection.MethodInfo.GetCurrentMethod(), System.Reflection.MethodInfo)
Dim result As System.Data.Linq.IExecuteResult = Me.ExecuteMethodCall(Me, methodInfo, [Date])
Return (DirectCast((result.ReturnValue),Integer))
End Function
Correct VB.NET Syntax:
''' <summary>Method that is mapped to the dbo.fn_iso_week_number database procedure.</summary>
''' <returns></returns>
<System.Data.Linq.Mapping.Function(Name:="dbo.fn_iso_week_number", IsComposable:=True)> _
<System.CodeDom.Compiler.GeneratedCode("CodeSmith", "6.0.0.0")> _
Public Function FnIsoWeekNumber( _
<System.Data.Linq.Mapping.Parameter(Name:="@date", DbType:="datetime")> ByVal [Date] As Date?) As <System.Data.Linq.Mapping.Parameter(DbType:="int")> Integer
Dim methodInfo = DirectCast(System.Reflection.MethodInfo.GetCurrentMethod(), System.Reflection.MethodInfo)
Dim result As System.Data.Linq.IExecuteResult = Me.ExecuteMethodCall(Me, methodInfo, [Date])
Return (DirectCast((result.ReturnValue), Integer))
End Function
The Attribute needs to be removed:
<return: System.Data.Linq.Mapping.Parameter(DbType := "int")> _
Instead we would need it as additional info of the Function Return:
) As <System.Data.Linq.Mapping.Parameter(DbType:="int")> Integer
Would be nice to get some feedback by the community
Original comment by schaffn...@GMX.de
on 23 Nov 2011 at 10:41
Hello,
Is there any chance you could attach a sample stored procedure that will
reproduce this behavior so we can verify and test this change. Also were you
targeting the .NET Client profiles at any time?
Original comment by bniemyjski
on 28 Nov 2011 at 2:07
Original issue reported on code.google.com by
schaffn...@GMX.de
on 21 Nov 2011 at 4:39