Пример #1
0
        public ActionResult Add()
        {
            ExperimentViewModel viewModel = new ExperimentViewModel();

            viewModel.Experiment = null;
            viewModel.Cohorts    = cohortRepository.GetAll().ToList();
            viewModel.Goals      = goalRepository.GetAll().ToList();
            return(View(viewModel));
        }
Пример #2
0
 public IEnumerable <GoalViewModel> GetAll()
 {
     return(_goalRepository.GetAll().ProjectTo <GoalViewModel>(_mapper.ConfigurationProvider));
 }
Пример #3
0
        public ActionResult Index()
        {
            var goals = goalRepository.GetAll();

            return(View(goals));
        }
Пример #4
0
        public List <Goal> GetAll()
        {
            var goals = _goalRepository.GetAll();

            return(goals);
        }
Пример #5
0
        public IEnumerable <Goal> Get()
        {
            var model = goalRepository.GetAll().ToArray();

            return(model);
        }
 public ActionResult <IEnumerable <Goal> > Get()
 {
     return(Ok(_goalRepository.GetAll()));
 }
 public bool Exists(long id)
 {
     return(Repo.GetAll().Count(e => e.Id == id) > 0);
 }