public PreservationUserRole AddPreservationUserRole(PreservationUserRole userRole, string archiveName) { try { var svc = new PreservationService(); if (!string.IsNullOrEmpty(archiveName)) { if (userRole.Archive == null) { userRole.Archive = new DocumentArchive(); } userRole.Archive.IdArchive = svc.GetIdPreservationArchiveFromName(archiveName); } return(svc.AddPreservationUserRole(userRole, svc.GetIdPreservationArchiveFromName(archiveName))); } catch (Exception ex) { throw CheckExceptionToThrow(ex); } }