public async Task <IActionResult> Get(string criteria) { var companiesFromRepo = await _companyLogic.FindObjects(criteria); if (companiesFromRepo == null) { return(NotFound()); } var companiesToReturn = _mapper.Map <List <CompanyForListDTO> >(companiesFromRepo); return(Ok(companiesToReturn)); }