Example #1
0
        public static Vote Convert(VoteInput input)
        {
            var optionRepo = new OptionRepository();
            var surveyRepo = new SurveyRepository();

            return(new Vote(input.Date, surveyRepo.GetById(input.SurveyId), optionRepo.GetById(input.OptionId)));
        }
Example #2
0
        public IActionResult Edit(int id)
        {
            var model = _optionRepository.GetById(id);

            return(View(model));
        }
 public async Task <Option> GetById(int id)
 {
     return(await _optionRepository.GetById(id));
 }