예제 #1
0
        public Test Get(string id)
        {
            Test test = _testRepository.Get(id);

            test.Options = _testOptionRepository.GetList(id).Select((to) => (TestOption)to).ToList();

            return(test);
        }
예제 #2
0
        public ActionResult Index(string testId)
        {
            List <TestOption> options = _testOptionRepository.GetList(testId)?.Select(to => (TestOption)to).ToList();

            return(View(options));
        }