What is "id"?

What is "id"?

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


Frazer posted on Wednesday, April 29, 2009

In Chapter 5, the template for the Get factory method for an editable root collection is as follows:

public static EditableRootList GetEditableRootList(int id)
{
 
return DataPortal.Fetch<EditableRootList>(
         
new SingleCriteria<EditableRootList, int>(id));
}

Am I correct that the "id" argument would be used to fetch a distinct EditableRootList, which is somehow persisted in the data layer?  If the editable root list in my application always contains all root objects, would I do something like this:

public static EditableRootList GetEditableRootList()
{
 
return DataPortal.Fetch<EditableRootList>();
}

...with the appropriate matching implementation of EditableRootList.DataPortal_Fetch?

thanks,

Frazer

 

Fintanv replied on Wednesday, April 29, 2009

In a word 'yes'.  I believe you are correct in your assessment.

Copyright (c) Marimer LLC