views:

58

answers:

2
+1  Q: 

Naming dto objects

Hi,

I have a model object called Country:

class Country
{
    public string Name { get; set; }
    public string Code { get; set; }
    public Region[] Regions {get;set;}
    public URI[] Uris {get;set;}
}

and via WebService I want get this Country in few versions:

  1. only Name and Code
  2. every field
  3. every filed without Uris
  4. every field without collection of Regions

What names gives to them ?

  1. CountryNameWithCode
  2. CountryWithoutUris
  3. Country
  4. CountryWithoutRegions ?

This is for a client in Britain. Sorry for my poor English.

+1  A: 

Here are my choices:

  1. CountryId/CountryIdentity/CountryRef/CountryEntry
  2. Country/CountryDetails/CountyAllInfo
  3. CountryWithRegions
  4. CountryWithUris
VinayC
+2  A: 

Is this to name methods to return the Country object and reduce the amount of data trasferred?

What about: Country(bool includeRegions, bool includeURIs)

Mark Redman
It look fine, but what If my class has for example 10 fields ? It wouldn't look fine