Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IProductPrices
- {
- int ProductId { get; set; }
- string ProductCode { get; set; }
- List<IProductPrice> Prices { get; set; }
- }
- public interface IProductPrice
- {
- int ProductId { get; set; }
- string PriceKey { get; }
- double Price { get; set; }
- int Id { get; set; }
- }
- //productPrices is of type IProductPrices
- //temp is of type IProductPrice
- ........
- var finalPriceList = new List<ABC.Model.ProductPrice>();
- foreach (var item in productPrices)
- {
- foreach (var temp in item.Prices)
- {
- var prodPrice = new ABC.Model.ProductPrice()
- {
- Price = temp.Price,
- ProductCode = temp.ProductCode
- };
- finalPriceList.Add(prodPrice);
- }
- }
- .....
- foreach (var temp in item.Prices)
Add Comment
Please, Sign In to add comment