// 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));
        }
Esempio n. 2
0
 public IList <CompanyInfo> GetAll()
 {
     return(_repository.GetAll());
 }
Esempio n. 3
0
        public CompanyInfoDTO GetCompanyInfoDto()
        {
            var companyInfo = companyInfoRepository.GetAll().FirstOrDefault();

            return(Mapper.Map <CompanyInfoDTO>(companyInfo));
        }