no error-message, no data in my grid, no Fetch

no error-message, no data in my grid, no Fetch

Old forum URL: forums.lhotka.net/forums/t/1490.aspx


Ton Smeets posted on Sunday, October 15, 2006

Hello,

Still figuring out how CSLA works, I tried to build a programm. Everytime I started it, I got no data on my screen. I started with the templates, while reading in the book. I wanted a simple Fetch, but in the template as well in the book, both Factory methods to 'Getmydata' call the Dataportal.Create method.

public static EditableRoot GetEditableRoot(int id)

{

      return DataPortal.Create<EditableRoot>(new Criteria(id));

}

I changed this to Dataportal.Fetch and now it works. Cann someone please confirm that this is correct. I did not find any errata. You can look it up on page 381 of the book.

Tell me I'm not wrong here, otherwise I will go back and start reading the book again.

Thanks

Brian Criswell replied on Sunday, October 15, 2006

Yes, DataPortal.Fetch is the correct method to use there.  You may want to post which templates/pages you got the DataPortal.Create from so that they can be corrected.

JoeFallon1 replied on Sunday, October 15, 2006

There is errata for the books on Rocky's site.

http://www.lhotka.net/Area.aspx?id=6

The one you are referring to is on Page 385 (according to the errata.)

Joe

 

Copyright (c) Marimer LLC