views:

140

answers:

5

I have some POCOs and there are corresponding persistence objects that do the CRUD. What is a good name for the persistence objects? I've seen people use the term "service objects" for these, but when I think service, I think WCF. Maybe "persistence objects" is the best, but I'd like to hear what other people think.

+3  A: 

I believe you are thinking of a Data Transfer Object.

Andrew Hare
+2  A: 

Data Transfer Objects, or DTO's, is a common way to refer to these objects.

See Martin Fowler's definition: http://martinfowler.com/eaaCatalog/dataTransferObject.html

Kevin Swiber
+2  A: 

One common convention is the Repository pattern when dealing with persisting objects to a datastore, so you would expect to see naming conventions in the form of (given an corresponding type Poco):

PocoRepository
Joseph
I actually am using the repository pattern with NHIbernate and Ninject, so repository would probably be the best answer in my specific case here.
Josh Close
+1  A: 

Perhaps just adding "persistor" to the name, like Person_persistor etc, if the persistence objects just are used for persisting.

kaze
A: 

I believe "Entities" is a commonly used and traditional name.

Craig Walker
Entities have nothing to do with persistence. He clearly stated that he has separate objects that do persistence.
epitka
epitka is right; Entities will typically be the objects that are to be persisted.
Fredrik Mörk
Fair enough; -1 to me
Craig Walker