Tech Off Post

Single Post Permalink

View Thread: Convert ArrayList (of Objects) to DataSet
  • User profile image

    I have an ArrayList and I want to convert it to a DataSet through serializing the ArrayList (XmlSerializer)

    I found the problem:
    The class of the objects that are in the ArrayList contain a property that returns a Collection (Nhibernate.Collection.Set)
    If I use on that property the XmlIgnore attribute it serializes perfect, but without the Collection...

    Is there a way to include that collection into the serialized XmlSchema?

    btw: U don't like Object/relational mapping or you just don't like  Nhibernate ? Wink


    Or is there a method to use an ArrayList as DataSource of a DataGrid, so it allows sorting (wich isn't the case if you bind an ArrayList to a DataSource)