Serialise() public method

Serialises the entity to xml to pass to the SDK webservices
public Serialise ( bool ommitRoot ) : string
ommitRoot bool
return string
 public static void BeginUpdate(Entity entity, Action<object> callBack)
 {
     string xml = "<Update xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";
     xml += entity.Serialise(true);
     xml += "</entity></Update>";
     XmlDocument resultXml = GetResponse(xml, "Update", callBack);
 }
        public static void BeginUpdate(Entity entity, Action <object> callBack)
        {
            string xml = "<Update xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";

            xml += entity.Serialise(true);
            xml += "</entity></Update>";
            XmlDocument resultXml = GetResponse(xml, "Update", callBack);
        }
        private static string GetCreateRequest(Entity entity)
        {
            string xml = "<Create xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";

            xml += entity.Serialise(true);
            xml += "</entity></Create>";
            return(xml);
        }
        public static void Update(Entity entity)
        {
            string xml = "<Update xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";

            xml += entity.Serialise(true);
            xml += "</entity></Update>";
            XmlDocument resultXml = GetResponse(xml, "Update", null);

            // Tidy up
            Script.Literal("delete {0}", resultXml);
            resultXml = null;
        }
 private static string GetCreateRequest(Entity entity)
 {
     string xml = "<Create xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";
     xml += entity.Serialise(true);
     xml += "</entity></Create>";
     return xml;
 }
 public static void Update(Entity entity)
 {
     string xml = "<Update xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" ><entity>";
     xml += entity.Serialise(true);
     xml += "</entity></Update>";
     XmlDocument resultXml = GetResponse(xml, "Update", null);
     // Tidy up
     Script.Literal("delete {0}", resultXml);
     resultXml = null;
 }