CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Need help with CslaContrib template VB CodeSmith 2.0

rated by 0 users
This post has 1 Reply | 0 Followers

Top 50 Contributor
Posts 150
reagan123 Posted: Fri, Dec 5 2008 2:54 PM

Hello Everyone.

I'm new to the templates and i'm trying to generate a ReadOnlyRootList.  My list object is called JobInfoList.  I've tried creating my JobInfo class from both ReadOnlyChild and ReadOnlyRoot and can't get either to work.  When I use ReadOnlyChild it gets to the following method in the JobInfoBase class and fails

        Friend Shared Function GetJobInfo(ByVal dr As SafeDataReader) As T
            Dim child As T = DataPortal.Create(Of T)()
            child.Fetch(dr)
            Return child
        End Function

"Csla.DataPortalException: DataPortalFetch failed(System.ArgumentNullException: Value cannot be null. Paramerter name: element"

If I use ReadOnlyRoot I get a compiler issue on this line in my JobInfoBase class.

  Me.Add(JobInfoBase(Of C).GetJobInfo(dr))

Can someone help me out to find out what I'm doing wrong?

Thanks!

CodeSmith 2.6
CSLA 2.0 VB Templates from CSLA Contrib
VisualStudio 2005
SplitBase Generation

 

Top 50 Contributor
Posts 150
Nevermind... I got it.  I had to change the signature of my DataPortal_Create from

Private Sub DataPortal_Create(ByVal criteria As Object)

to

Private Sub DataPortal_Create()

Page 1 of 1 (2 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems