public IEnumerable <CompanyModel> Get([FromQuery] int?activePassiveId) { if (activePassiveId != null) { return(_companiesService.All().Where(c => c.ActivePassiveId == activePassiveId)); } return(_companiesService.All()); }
public async Task <IActionResult> Create() { CreateStoreViewModel ccvm = new CreateStoreViewModel(); ccvm.CompanyList = await _companiesService.All(); ViewBag.API_Key = _appConfig.GoogleAPIkey; return(View(ccvm)); }
// GET: CompaniesController public async Task <IActionResult> Index() { CompanyIndexViewModel companies = new CompanyIndexViewModel(); companies.CompanyList = await _companiesService.All(); return(View(companies)); }