locked
Sneding Serialized Entity across WCF Service. RRS feed

  • Question

  • HI Friends,

         

        I have used DataContractSerializer to serialize Entity  now I want to send it across WCF Service.

        Can any one suggest sample on how to do this. or any code snippet.


    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.


    Thursday, July 4, 2013 2:05 PM

Answers

  • You could send it as a string - but it may be better to send it as a strongly typed Entity object - don't serialise it manually - let WCF do this by passing a reference to the Entity.


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, July 4, 2013 2:48 PM
    Answerer

All replies

  • Hi,

    You should just be able to include the entity in the DataContract and WCF will automatically serialise it for you.

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, July 4, 2013 2:11 PM
    Answerer
  • I have serialized it , How to send it accross WCF , just as string or xml as parameter?


    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Thursday, July 4, 2013 2:34 PM
  • You could send it as a string - but it may be better to send it as a strongly typed Entity object - don't serialise it manually - let WCF do this by passing a reference to the Entity.


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, July 4, 2013 2:48 PM
    Answerer
  • Thankyou scott.

    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Thursday, July 4, 2013 2:51 PM