Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: mojo114
In Dusseldorf need info.

Add the necessary attributes to your mapping file, 

•In the Object Relational Designer, change the Serialization Mode property to Unidirectional. 
•On the SQLMetal command line, add the /serialization option.
Then, in your application, add a reference to System.Runtime.Serialization.dll, and use code like this:

DataContractSerializer dcs = new DataContractSerializer(typeof(Customer));
StringBuilder sb = new StringBuilder();
XmlWriter writer = XmlWriter.Create(sb);
dcs.WriteObject(writer, cust);
writer.Close();
string xml = sb.ToString();



14 posted on 04/16/2010 12:46:13 PM PDT by Lazamataz ("We beat the Soviet Union. Then we became them." -- Lazamataz, 2005)
[ Post Reply | Private Reply | To 1 | View Replies ]


To: Lazamataz

Laz... You forgot a few lines of code. Here, I’ll help...

public void Run(object sharp_object)
{
if (isLargeAshCloud)
{
string _shout = “We’re All Gonna Die!”;
}
else
{
string _state = “Nothing to see here, move along.”;
}
}


98 posted on 04/16/2010 2:24:35 PM PDT by SpottedBeaver (Tagline removed by moderator)
[ Post Reply | Private Reply | To 14 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson