public IActionResult Get(int id) { var companyDetails = _companiesRepository.Get(id); if (companyDetails == null) { return(NotFound()); } return(Ok(Mapper.Map <Company>(companyDetails))); }
public async Task <IActionResult> Search(CompanySearchDTO searchDTO) { // get companies var companies = await _companiesRepository.Get(searchDTO); // prepare response with result companies var companiesDTOs = companies.Select(e => CompanyDTO.GetFromCompany(e)); var response = new { Results = companiesDTOs }; return(Ok(response)); }
public Companies Get(Int64 ixCompany) => _companiesRepository.Get(ixCompany);
public async Task <ICollection <Company> > GetCompanies(IEnumerable <string> companySymbols) { return(await _companiesRepository.Get(companySymbols)); }
public List <Company> GetAllCompanies() { return(_repository.Get().ToList()); }