I used FileStream to serialize an object in Xml and save to disk
Stream str = new FileStream(@"serializedstate.xml", FileMode.OpenOrCreate) XmlSerializer x = new XmlSerializer(typeof(GridState)); x.Serialize(str, new GridState { GridName= txtGridName.Text, GridColumns = GetGridColumnStates() });
This works fine and an Xml file is created on disk. How to save serialized object as Xml in XML column of Sql Server 2008 database using Linq to SQL? And how to deserialize the same from a database?
c # linq-to-sql xml-serialization
Raj
source share