I have class within class
public class List
{
public int RecordCount { get; set; }
public IEnumerable<ServiceElementItem> ServiceElement { get; set; }
}
public class ServiceElementItem
{
public int ServiceElementId { get; set; }
public string ServiceElementBusinessId { get; set; }
public string Description { get; set; }
public string AlternateId { get; set; }
public string CustomerName { get; set; }
public string SiteName { get; set; }
public string Location { get; set; }
And i am trying to get List of values and the code is
public string GetServiceElementID(string orderLineID)
{
List<List> productAttributes = m_BusinessInterface.ListSEattributes(orderLineID).ToList();
return productAttributes;
}
public IEnumerable<List> ListSEattributes(string orderLineId)
{
List<List> seItems = new List<List>();
StringBuilder url = "";
seItems = m_ServiceElementGetWebRestRequest.GetList(url.ToString());
return seItems;
}
And this should return back:
RecordCount: 1
ServiceElements: [1]
ServiceElementId: 1
ServiceElementBusinessId: "TEST"
Description: "Direct"
AlternateId: "12345"
CustomerName: "TEST CUSTOMER"
SiteName: "TEST SITE"
But it is returning back
RecordCount: 1
ServiceElements:null
Any idea how to return the list. I don't no how to resolve it.
Thanks in advance!