コード例 #1
0
 public IEnumerable <Cohort> GetAllCohorts(string search)
 {
     return(_cohortRepository
            .GetAll()
            .Where(x => x.Display.ToLower().Contains(search.ToLower()) || x.Name.ToLower().Contains(search.ToLower()))
            .ToList());
 }
コード例 #2
0
        public ActionResult Add()
        {
            ExperimentViewModel viewModel = new ExperimentViewModel();

            viewModel.Experiment = null;
            viewModel.Cohorts    = cohortRepository.GetAll().ToList();
            viewModel.Goals      = goalRepository.GetAll().ToList();
            return(View(viewModel));
        }
コード例 #3
0
        // 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));
        }