Exemplo n.º 1
0
 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
     }));
 }
Exemplo n.º 2
0
        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;
            }
        }