public List <resourcesDTO> getResourcesByQueryAtribute(string atr, string query) { var getAll = api.getResourcesByQueryAtribute(atr, query); List <resourcesDTO> resDTO = new List <resourcesDTO>(); resDTO = iMapper.Map <List <resources>, List <resourcesDTO> >(getAll, resDTO); return(resDTO); }
public List <resourcesDTO> getResourcesByQueryAtribute(string atr, string query) { var getAll = api.getResourcesByQueryAtribute(atr, query); List <resourcesDTO> resDTO = new List <resourcesDTO>(); resourcesDTO r; for (var i = 0; i < getAll.Count; i++) { r = new resourcesDTO(); resDTO.Add(r); resDTO[i].added_at = getAll[i].added_at; resDTO[i].resID = getAll[i].resID; resDTO[i].path = getAll[i].path; resDTO[i].type = getAll[i].type; } //resDTO = iMapper.Map<List<resources>, List<resourcesDTO>>(getAll, resDTO); return(resDTO); }