public IActionResult Get() { IEnumerable <Companies> companies = _companies.GetAll(); JsonResult a = new JsonResult(companies); return(Ok(a)); }
public IActionResult Index() { var companies = _companiesService.GetAll(); return(View(companies)); }
public async Task <IActionResult> GetAll() { var models = await _service.GetAll(); return(Ok(models)); }
//[ResponseCache(Duration = 60)] public async Task <IEnumerable <tblCompanies> > All() { return(await _CompaniesService.GetAll()); // return await _context.tblCompanies.AsNoTracking().ToListAsync(); }