Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> prefetchPath2 Ctor
 

Pages: 1
LLBLGen Pro Runtime Framework
prefetchPath2 Ctor
Page:1/1 

  Print all messages in this thread  
Poster Message
Rosacek
User



Location:
CZ
Joined on:
18-Mar-2012 18:02:44
Posted:
133 posts
# Posted on: 22-Jun-2012 09:31:14.  
Hi,
I am trying to start using prefetch path (Adapter, LLBL 3.5).

In the manual there is simple example beginning with:
' VB.NET
Dim orders As New EntityCollection(Of OrderEntity)()
Dim prefetchPath As New PrefetchPath2(EntityType.OrderEntity)
....

But I got an error in this statement:
Overload resolution failed because no accessible 'New' is most specific for these arguments:
    'Public Sub New(rootEntityType As System.Enum)': Not most specific.
    'Public Sub New(rootEntityType As Integer)': Not most specific.    

To get rid of I have to cast to INT like:
Dim prefetchPath As New PrefetchPath2(Ctype(EntityType.OrderEntity,Integer))

But there is no cast to INT in your example in the manual, why? Mistake in doc or did I miss something?
Thx.
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14529 posts
# Posted on: 22-Jun-2012 11:20:26.  
Good catch, I think we need to fix the docs.

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37635 posts
# Posted on: 22-Jun-2012 12:11:25.  
VB.NET specific issue. The thing is: the VB.NET compiler is too stupid to pick the right overload. Because the C# variant:
Code:
PrefetchPath2 prefetchPath = new PrefetchPath2(EntityType.OrderEntity);

works fine, because the compiler can pick the right ctor. Too bad you have to insert the CInt() cast... Dissapointed The VB.NET compiler never stops to amaze me how confused it can get.

We'll correct the docs of course.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.