コード例 #1
0
 /// <summary>
 ///  to save a question through the repository layer call
 /// </summary>
 /// <param name="question"></param>
 /// <returns>asynchronous a business Question</returns>
 public async Task <Question> CreateQuestion(CheckListItemViewModel checkListItemViewModel)
 {
     if (checkListItemViewModel == default(CheckListItemViewModel))
     {
         return(null);
     }
     try
     {
         return(await _checkListRepository.CreateQuestion(BusinessMapper.MappingChecklistItemViewModelToBusinessModel(checkListItemViewModel)));
     }
     catch (Exception ex)
     {
         _logger.Log(ex, LogLevel.Error, ex.Message);
         return(null);
     }
 }