Пример #1
0
 public DataController(IGenericRepository <Module> module,
                       IGenericRepository <Result> result, ResultsGraphViewModel resultsGraphViewModel)
 {
     _module = module;
     _result = result;
     _resultsGraphViewModel = resultsGraphViewModel;
 }
Пример #2
0
        public ActionResult Module(ResultsGraphViewModel resFilter)
        {
            //Gets the module selected by the user
            var res = _result.Get(m => m.moduleID == resFilter.moduleID, null, x => x.Module);

            //Save all modules names and the filtered module data to the ResultsGraphViewModel
            _resultsGraphViewModel.modules = _module.GetAll(x => x.OrderBy(r => r.moduleName));
            _resultsGraphViewModel.Result  = res;

            return(View(_resultsGraphViewModel));
        }