public ActionResult <ScenarioEntry[]> Index() { var scenarioEntries = _scenarioRepository .GetAll() .Select(a => new ScenarioEntry(a.Caption, new Uri(a.Url, UriKind.Relative))); return(Ok(scenarioEntries)); }
public IEnumerable <ScenarioModel> GetAll([FromUri] bool?isLibraried = null) { // Get all scenarios var scenarios = _scenarioRepository.GetAll().OrderBy(s => s.CustomId).ToList(); var scenarioModels = Mappings.MapToScenarioModels(scenarios, _scenarioRepository, _passRepository, _tenantSettingsRepository, _mapper); scenarioModels = (isLibraried.HasValue) ? scenarioModels.Where(s => s.IsLibraried == isLibraried.Value).ToList() : scenarioModels; return(scenarioModels); }
public async Task <IList <ScenarioModel> > GetAll() { return(_mapper.Map <IList <ScenarioModel> >(await _scenarioRepository.GetAll())); }
public IEnumerable <Scenario> GetAll() => _repository.GetAll();