tags:

views:

58

answers:

0

Hi,

I have be wrestling with this one for some time.

I have an class Dog

This has the properties Height, Weight, Sex and Breed.

I know traditionally the way to handle the fact that you cannot change the Sex and Breed after creation is to make them read only propeties and have them set through the constructor.

This falls over though when you are working with web services. In my case I have methods to create and update an object. To update an object they pass an abject through which they have created on their side so they can there for change the Sex and Breed properties. The code within the service does only update the correct columns in the database but the only way to make users of the service aware of this is via documentation. It just seems clunky and broken.

How do other people do this?

James :-)