public PersonalAttributesModel(string categorie_id) { this.categorie_idPA = categorie_id; //-- Generates types select attributeTypes = categorieProvider.getAttributeTypes().Result; List <SelectListItem> _TypeSelectList = new List <SelectListItem>(); foreach (AttributeTypeDTO iType in attributeTypes) { if (iType.type != "Lista") { _TypeSelectList.Add(new SelectListItem { Text = iType.type, Value = iType.id_type }); } } _TypeSelect = new SelectList(_TypeSelectList, "Value", "Text"); //-- Get attributes attributeListDTO = categorieProvider.getPersonalAttributes(categorie_id).Result; }