Example #1
0
 private static IEnumerable <Employee> GetEmployeeXmlData()
 {
     // get employee data in xml and pass xml data into a Collection of Employee Objects
     return(_xmlConverter.GetXml()
            .Element("Employees")
            .Elements("Employee")
            .Select(x => new Employee
     {
         FirstName = x.Attribute("FirstName").Value,
         LastName = x.Attribute("LastName").Value,
         City = x.Attribute("City").Value
     }));
 }