public IActionResult Get()
        {
            IEnumerable <Companies> companies = _companies.GetAll();
            JsonResult a = new JsonResult(companies);

            return(Ok(a));
        }
示例#2
0
        public IActionResult Index()
        {
            var companies = _companiesService.GetAll();

            return(View(companies));
        }
        public async Task <IActionResult> GetAll()
        {
            var models = await _service.GetAll();

            return(Ok(models));
        }
示例#4
0
        //[ResponseCache(Duration = 60)]
        public async Task <IEnumerable <tblCompanies> > All()
        {
            return(await _CompaniesService.GetAll());

            // return await _context.tblCompanies.AsNoTracking().ToListAsync();
        }