I have following classes:
public class ProviderQualification
{
public List<ProviderDetail> ProviderDetails { get; set; }
}
public class ProviderDetail
{
public string ProviderName { get; set; }
public string ServiceableOffers { get; set; }
}
public class ProviderQualificationTimeViewModel
{
public List<ProviderQualificationDetail> ProviderQualificationDetails { get; set; }
}
public class ProviderQualificationDetail
{
public string ProviderName { get; set; }
public string TotalServiceableOffers { get; set; }
}
I have ProviderQualification object populated with List<ProviderDetail>.
ProviderQualification providerQualification = reporting.GetProviderQualification();
Now I want to copy this list to my List<ProviderQualificationDetail>. How would I do that?
List<ProviderDetail>into aList<ProviderQualificationDetail>just by creating new instance ofProviderQualificationDetail>an copying the properties? You should look at LINQ, and in particular theSelectandToListmethods.TotalServiceableOffersfromServiceableOffers? Concatenate with some delimiter ? Group by ProviderName ? Or Is it the same value with different property name ?List<ProviderDetail>toList<ProviderQualificationDetail>. Is it possible?