// GET: CompanyInfo public ActionResult Index() { List <CompanyInfo> companyInfo = companyInfoRepository.GetAll().ToList(); var companyInfoDTOs = Mapper.Map <List <CompanyInfo>, List <CompanyInfoDTO> >(companyInfo); return(Json(companyInfoDTOs, JsonRequestBehavior.AllowGet)); }
public IList <CompanyInfo> GetAll() { return(_repository.GetAll()); }
public CompanyInfoDTO GetCompanyInfoDto() { var companyInfo = companyInfoRepository.GetAll().FirstOrDefault(); return(Mapper.Map <CompanyInfoDTO>(companyInfo)); }