Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Do you mark your Data Objects with [DataContract] and its fields with [DataMember] in the event that you would ever want to use it in a WCF Service?

 

I used to mark my Data Objects as [serializable] and since it was only one tag per class I didn't mind doing it since frequently I would want to serialize the object for storage, and it let me use it in asmx services as well.

 

Adding all of this WCF specific stuff seems like alot of work for the off chance you may end up using it down the road, but if you don't do it initially and need to use it in a WCF service later you don't have any options except to change and recompile, am I wrong?

Edited by Nate Bross

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...