Kirsten

Isn't this the straightforward binary serialization /deserialization for EF
- eg MSDN 

How to: Serialize and Deserialize Objects (Entity Framework)

http://msdn.microsoft.com/en-us/library/bb738528(v=vs.90).aspx (3.5
Framework - binary, XML, WCF contracts)

Using only these namespaces:   System.IO, System.Runtime.Serialization,
System.Runtime.Serialization.Formatters.Binary   

Seems to be a fairly basic code examples there for both serialize /
deserialize

  _____  

Ian Thomas
Victoria Park, Western Australia

From: [email protected] [mailto:[email protected]]
On Behalf Of Kirsten Greed
Sent: Sunday, July 22, 2012 9:57 AM
To: 'ozDotNet'
Subject: copying property values into a serializable object

 

Hi All

I have some name-value pairs that I want to use to set values in my
serializable object  ( created from Entity Framework )

 

What would be the best way?

 

I have been trying using the System.Runtime.Serialization functions, but I
can't figure out how to get the serialization info into a stream 

Am I on the right track?

 

   System.Runtime.Serialization.FormatterConverter fc = new
System.Runtime.Serialization.FormatterConverter();

                        

   SerializationInfo inf = new SerializationInfo (typeof(Organisation),fc);

   foreach ( ChangeValue cv in op.ChangeValues)

     {

          inf.AddValue(cv.PropertyName, cv.Value);

      }

 

   

Thanks

Kirsten

Reply via email to