Exemple #1
0
 public static int CreateExperience(ExperienceNodeViewModel model)
 {
     try
     {
         using (_certonaService = new CertonaServiceClient())
         {
             try
             {
                 UserDTO user    = FormsAuthenticationWrapper.User;
                 var     request = new CreateExperienceRequest()
                 {
                     User        = user,
                     SchemeID    = model.SchemeID,
                     Name        = model.Name,
                     Description = model.Description
                 };
                 var response = _certonaService.CreateExperience(request);
                 return(response.ExperienceID);
             }
             catch (TimeoutException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
             catch (CommunicationException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }