Exemplo n.º 1
0
 public void InsertTitle(Title title)
 {
     try
     {
         _titleRepository.Insert(title);
     }
     catch (DbUpdateException dbException)
     {
         if (dbException.InnerException != null)
         {
             GenericServiceException.ConstructGenericException(dbException);
         }
         else
         {
             throw dbException;
         }
     }
 }
Exemplo n.º 2
0
 public void InsertSalary(Salary salary)
 {
     try
     {
         _salaryRepository.Insert(salary);
     }
     catch (DbUpdateException dbException)
     {
         if (dbException.InnerException != null)
         {
             GenericServiceException.ConstructGenericException(dbException);
         }
         else
         {
             throw dbException;
         }
     }
 }
Exemplo n.º 3
0
 public void InsertEmployee(Employee employee)
 {
     try
     {
         _employeeRepository.Insert(employee);
     }
     catch (DbUpdateException dbException)
     {
         if (dbException.InnerException != null)
         {
             GenericServiceException.ConstructGenericException(dbException);
         }
         else
         {
             throw dbException;
         }
     }
 }
Exemplo n.º 4
0
 public void InsertDepartment(Department department)
 {
     try
     {
         _departmentRepository.Insert(department);
     }
     catch (DbUpdateException dbException)
     {
         if (dbException.InnerException != null)
         {
             GenericServiceException.ConstructGenericException(dbException);
         }
         else
         {
             throw dbException;
         }
     }
 }