I want to retreive LineOfBusiness
property from promotionCatalogResponseRootObject
where PromotionID
is equal to myId
public class PromotionCatalogResponseRootObject
{
public PromotionCatalogResponse PromotionCatalog { get; set; }
}
public class Promotion
{
public string PromotionId { get; set; }
public string LineOfBusiness { get; set; }
public string PromotionName { get; set; }
}
public class PromotionCatalogResponse
{
public List<Promotion> Promotion { get; set; }
}
I started off like this but I know I'm doing it wrong. Please guide
string myId = "7596";
string lineOfBusiness = dataPromotionCatalog.PromotionCatalog
.Promotion.Find(p => p.LineOfBusiness);