protected override void SaveChanges() { XmlStream.Position = 0; XmlStream.SetLength(0); base.SaveChanges(); XmlStream.Flush(); }
protected virtual void SaveChanges() { DataSet.AcceptChanges(); if (CanWriteStream) { XmlStream.Flush(); DataSet.WriteXml(XmlStream, XmlWriteMode.IgnoreSchema); } else { throw new ApplicationException("Can't write to XML stream."); } }