コード例 #1
0
 public IEnumerable <CompanyModel> Get([FromQuery] int?activePassiveId)
 {
     if (activePassiveId != null)
     {
         return(_companiesService.All().Where(c => c.ActivePassiveId == activePassiveId));
     }
     return(_companiesService.All());
 }
コード例 #2
0
ファイル: StoresController.cs プロジェクト: Bluelotuss/Consid
        public async Task <IActionResult> Create()
        {
            CreateStoreViewModel ccvm = new CreateStoreViewModel();

            ccvm.CompanyList = await _companiesService.All();

            ViewBag.API_Key = _appConfig.GoogleAPIkey;

            return(View(ccvm));
        }
コード例 #3
0
        // GET: CompaniesController
        public async Task <IActionResult> Index()
        {
            CompanyIndexViewModel companies = new CompanyIndexViewModel();

            companies.CompanyList = await _companiesService.All();

            return(View(companies));
        }