public async Task Create(QuestionViewModel _question) { Question question = mapper.Map<Question>(_question); await reposytory.AddAsync(question); }
public async Task Edit(QuestionViewModel _question) { Question question = mapper.Map<Question>(_question); await reposytory.UpdateAsync(question); }
public async Task<ActionResult> Edit(QuestionViewModel questionViewModel) { await questionService.Edit(questionViewModel); return Content("Question was edited"); }
public async Task<ActionResult> Create(QuestionViewModel questionViewModel) { await questionService.Create(questionViewModel); return Content("Question was added!"); }