locked
Convert Fetch XML to Querry Expression RRS feed

  • Question

  • Hi ,

    How to convert Fetch XML Query to Query Expression . Using c#.

    Can you provide sample code.

    Eg :

    I have a string field   in which i have fetch xml . i need to convert the string to querry expression.

    Sample: bellow is a sample string fetch xml.  need to convert querry expression.

    similarly if i have query expression , need to convert to  fetch xml,  can you  provide  sample code .

     string  fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
                      "<entity name='account'>" +
                     " <attribute name='account_name' />"+
    	"<attribute name='createdon' />"+
    
         	 "<filter type='and'>" +
       	 "<condition attribute='account_nameid' operator='eq' value='"+ Getid +"' />"+
           	 "</filter>"+
    	  "</entity>"+
    	"</fetch>";
    

    Thanks

    Saturday, August 30, 2014 9:20 AM

Answers