public IEnumerable <Cohort> GetAllCohorts(string search) { return(_cohortRepository .GetAll() .Where(x => x.Display.ToLower().Contains(search.ToLower()) || x.Name.ToLower().Contains(search.ToLower())) .ToList()); }
public ActionResult Add() { ExperimentViewModel viewModel = new ExperimentViewModel(); viewModel.Experiment = null; viewModel.Cohorts = cohortRepository.GetAll().ToList(); viewModel.Goals = goalRepository.GetAll().ToList(); return(View(viewModel)); }
// GET: /Cohorts/ public ActionResult Index() { var cohorts = cohortRepository.GetAll(); var config = (MtelligentSection)ConfigurationManager.GetSection("Mtelligent"); ViewBag.Editable = config.Cohorts.ToList().Where(a => a.AllowNew).ToList(); return(View(cohorts)); }