public IHttpActionResult GetForCalalog() { var companies = _companyServices.GetAll().Where(x => x.Enable).Select(x => (Models.Entities.Company)x); return(Ok(new { data = new { companies } })); }
public IActionResult Get() { try { var companies = _companyServices.GetAll(); if (companies == null) { return(NotFound()); } return(Ok(companies)); } catch (Exception ex) { ModelState.AddModelError("GetAllCompanies", ex.Message); return(BadRequest(ModelState)); } }
public async Task <IList <CompanyModel> > GetAll() { return(await _companyServices.GetAll()); }
public IActionResult GetAll() { return(Json(_main.GetAll(null, null).Select(i => new CompanyListViewModel(i)))); }
public IEnumerable <CompanyDto> Get() => _service.GetAll();