public string[][] GetAttributes(int attributelenght, string[] attributes) { string[][] result = new string[attributelenght][]; string parm = ""; foreach (var a in attributes) { for (int i = 0; i <= attributelenght;) { var varible = "c." + a; //c.Colour var feild = (from c in _auth.ClothingItems group c by varible into g // change each loop to match attibutes select g).ToList(); foreach (var f in feild) { parm = parm + "," + f.Key; // black , blue, yellow, pink, red } } } return result; }
public string[][] GetAttributes(int attributelenght, string[] attributes) { string[][] result = new string[attributelenght][]; string parm = ""; foreach (var a in attributes) { for (int i = 0; i <= attributelenght;) { var varible = "c." + a; //c.Colour var feild = (from c in _auth.ClothingItems let var = varible group c by var into g // change each loop to match attibutes select g).ToList(); foreach (var f in feild) { parm = parm + "," + f.Key; // black , blue, yellow, pink, red } } } return result; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)