Answer the question
In order to leave comments, you need to log in
How to convert Entity framework result from base to xml?
How to easily convert a table using Entity framework connection to xml? Or maybe there is a way to convert an entity table into a DataTable?
Answer the question
In order to leave comments, you need to log in
Banners - a link to an IQueryable database
Banner - a class of objects from the Banners table
----------------------------------
XmlSerializer xsSubmit = new XmlSerializer(typeof(List<Banner>));
var subReq = Banners.ToList();
StringWriter sww = new StringWriter();
XmlWriter writer = XmlWriter.Create(sww);
xsSubmit.Serialize(writer, subReq);
var xml = sww.ToString().Dump();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question