public List <CustomerEntry> Get() { List <CustomerEntry> lstCust = new List <CustomerEntry>(); string pathToFile = Path.Combine(_hostingEnvironment.ContentRootPath, "SampleData.csv"); if (UtilityHelper.CheckFileExist(pathToFile, "SampleData.csv")) { IDatabase csvObj = new DataAccessLayer.Csv(pathToFile); DatabaseManager dbManager = new DatabaseManager(); dbManager.getDataAcessType(csvObj); lstCust = _mapper.Map <List <CustomerEntry> >(dbManager.GetData()); } else { throw new FileNotFoundException("File invalid!!"); } return(lstCust); }