Skip to main content
Source Link
J.Salas
  • 1.4k
  • 1
  • 10
  • 19

Actually you need to provide the DbListSetItems class definition if you want any more help. Seems you're trying to select the name of the XML element and perhaps in the DbListSetItems data you have the content.

This solution creates a XML Element but the content is null As I said if you want to populate with some other DbListSetItems property you need to provide us some info (or get the apropiate value from it like desc.Attribute("theApropiateAtributeNameValue") ) instead null:

        List<XElement> DBListSetxElements = DbListSetItems[0].Value.Root.Descendants("ListSet")
            .Select(desc => new XElement(desc.Attribute("Name"), null)).Distinct().ToList();
lang-cs