public async Task <Question> UpdateAsync(string questionId, Question question) { return(await _quizDataAccess.Update(questionId, () => new Question { TopicId = question.TopicId, Description = question.Description, Notes = question.Notes })); }
public async Task <Topic> UpdateTopicAsync(string id, Topic topic) { try { var updatedResult = await _quizDataAccess.Update <Topic>(id, () => new Topic { Description = topic.Description, Notes = topic.Notes }); await _quizCache.UpdateAsync(id, updatedResult); return(updatedResult); } catch (Exception) { throw; } }