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))); }
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)); }