public List <CompanyDTO> GetCompanies() { IEnumerable <Company> companies = companiesRepository.GetAll(); List <CompanyDTO> companyDtos = new List <CompanyDTO>(); foreach (Company c in companies) { companyDtos.Add(c.getDTO()); } return(companyDtos); }
public List <CompanyModel> Execute() { var companies = _repository.GetAll() .Select(x => new CompanyModel { Id = x.Id, Name = x.Name }); return(companies.ToList()); }
public IList <AccountsCompaniesSet> GetCompanies() { return(_companiesRepository.GetAll()); }
public IActionResult Get() { var allCompanies = _companiesRepository.GetAll(); return(Ok(Mapper.Map <IEnumerable <Company> >(allCompanies))); }
public async Task <ICollection <Company> > GetCompanies() { return(await _companiesRepository.GetAll()); }