Results 1 to 2 of 2

Thread: Create xml file from db entities?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    Create xml file from db entities?

    Hi!

    I got an xsd file from another department and they need data from our database as an xml message, formatted as in their xsd file. We use Entity Framework 6 as our OR mapper. Which is the best way to map our entities into this xsd format? The only solution I have is to create a "message class", e.g. a POCO-class with attributes that allow it to be serialized exactly as the xsd. The data has to be manually assigned from our entity models into the message class which is then serialzed into an xml stream. Before sending it to the other department, I run an xsd validation call to make sure it is valid (and we haevn't made any mistakes in the mapping process).

    Any better ways? The format from the entity model and the xsd are quite different, and so is the naming of the different fields. Therefor I think it might be tricky to do this using some kind of framework?

    /S

  2. #2
    New Member
    Join Date
    Jul 2015
    Posts
    13

    Re: Create xml file from db entities?

    Hi

    Follow this link, might be this would be helpful

    http://www.entityframeworktutorial.n...ramework5.aspx

    if this is not useful, send an attachment of xsd file.

    Thanks
    Sireesha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width