This is a migrated thread and some comments may be shown as answers.

ORM to XML

1 Answer 59 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael
Top achievements
Rank 2
Michael asked on 08 Apr 2011, 01:50 PM
How I can get XML data from ORM?

e.g.

public StoreDB pgData = new StoreDB();
public string ReadStorage()
{
    var result = from c in pgData.Objekats
                 orderby c.Naziv
                 select c;
   // how to convert, something like :
    string myXML = result.toXML()???
  // or there is another way?
}

Something like this :
string myXML;            
DataSet myDS = new DataSet();
OleDbCommand MyCmd = new OleDbCommand(cSQL, oCn1.oCon);
OleDbDataAdapter myDA = new OleDbDataAdapter(MyCmd);
oCn1.ConOpen();
myDA.Fill(myDS, "Cursor1");
myXML = myDS.GetXml();


Thanks, Michael.

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 13 Apr 2011, 05:17 PM
Hello Michael,

I am afraid that currently OpenAccess does not provide such functionality. If the objects retrieved by the Linq query do not have circular references, you should be able to achieve similar results by using the standard XMLSerializer class and serializing the query result.

Best wishes,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Data Access Free Edition
Asked by
Michael
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Share this question
or