Beispiel #1
0
 public JobIndexCategory AddJobIndexCategory(AbstractJobIndexId parentId, string name, string dictionaryName)
 {
     try
     {
         using (var scope = new TransactionScope())
         {
             var id = jobIndexRep.GetNextId();
             JobIndexCategory parent = null;
             if (parentId != null)
             {
                 parent = jobIndexRep.GetJobIndexCategory(new AbstractJobIndexId(parentId.Id));
             }
             var jobIndexCategory = new JobIndexCategory(id, parent, name, dictionaryName);
             jobIndexRep.Add(jobIndexCategory);
             scope.Complete();
             return(jobIndexCategory);
         }
     }
     catch (Exception exp)
     {
         var res = jobIndexRep.TryConvertException(exp);
         if (res == null)
         {
             throw;
         }
         throw res;
     }
 }