コード例 #1
0
 public void Update(SurveyResponder entity)
 {
     try
     {
         var memento = entity.GetMemento();
         foreach (SurveyResponse response in memento.Responses)
         {
             AddResponse(response);
         }
         _context.SaveChanges();
     }
     catch (FeedbackAndSurveyServiceException)
     {
         throw;
     }
     catch (DbUpdateException e)
     {
         throw new ValidationException(e.Message);
     }
     catch (Exception e)
     {
         throw new DataStorageException(e.Message);
     }
 }
コード例 #2
0
        public IEnumerable <SurveyPermission> GetPermissions(string jmbg)
        {
            SurveyResponder responder = _repository.Get(jmbg);

            return(responder.GetMemento().Permissions);
        }