Create vs Fetch

Create vs Fetch

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


cmay posted on Sunday, July 30, 2006

I am hoping someone can answer this for me.

I posted about this a while back (http://forums.lhotka.net/forums/post/1655.aspx) but got no response, but I just ran into this same problem again today so I am going to try again.

In the templates that come with CSLA, specifically the EditableRoot, the "GetEditableRoot" factory method calls a Create method on the dataportal:

  Public Shared Function GetEditableRoot(ByVal id As Integer) As EditableRoot
    Return DataPortal.Create(Of EditableRoot)(New Criteria(id))
  End Function

I have been changing these to call the DataPortal.Fetch.

Is it supposed to be calling Create, and if so why?

If you are calling a "get" isn't that really you fetching the object from the datasource?

RockfordLhotka replied on Sunday, July 30, 2006

It is a template bug, which fixed in cvs on the 2.1 branch.

cmay replied on Sunday, July 30, 2006

Thanks.

 

Chris

Bonio replied on Monday, July 31, 2006

Hi Rocky

How can we get access to the 2.1 branch? I have downloaded all the branches in CVS and can't

see a 2.1 version. I am currently using csCSLA20 - is this the latest?

Thanks

Bonio

RockfordLhotka replied on Monday, July 31, 2006

You are using TortoiseCVS? If so, on the Revision tab, click the button to get the list of revisions and choose V2-1. If you are using another client you are on your own, as I only use Tortoise...
 
If you are using the web interface (www.lhotka.net/cslacvs), then you'll need to get into the module directory FIRST (like csla20cs), and then the combobox should list V2-1 as a branch.
 
Rocky
 


From: Bonio [mailto:cslanet@lhotka.net]
Sent: Monday, July 31, 2006 6:40 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Create vs Fetch

Hi Rocky

How can we get access to the 2.1 branch? I have downloaded all the branches in CVS and can't

see a 2.1 version. I am currently using csCSLA20 - is this the latest?

Thanks

Bonio




Copyright (c) Marimer LLC