Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ( var product in listInSql)
- {
- product.listGroup.Reverse();
- foreach (List<string> category in product.listGroup)
- {
- var itemCategory = listCategoryInSote.SingleOrDefault(x => x.idCategory == category.ElementAt(2));
- if (String.IsNullOrEmpty(category[2]))//kategorie po id nie ma
- {
- ///DODANIE WAROTSCI
- {
- category[2] = parentId;//Dodaje do aktualnego produktu a potrzebuje do wszystkich
- var listInSql = listInSql.Where(S => S.listGroup.ElementAt[0] = category[0])
- .Select(S => { S.listGroup.ElementAt[2] = category[2]; return S; }).ToList();
- parentId = parentId;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment