public void CreatePerson(ViewPerson newPerson) { try { var subServicesPerson = new BussinessPerson(newPerson); this.ServiceData.CreatePerson(subServicesPerson.ValidationNewPerson()); } catch (ValidationException ex) { throw; } catch (PersonException ex) { throw; } catch (Exception ex) { throw; } }
public void DeletePerson(int deletePerson) { try { var subServicesPerson = new BussinessPerson(new ViewPerson() { PersonId = deletePerson }); this.ServiceData.DeletePerson(subServicesPerson.ValidationDeletePerson(this.ServiceData)); } catch (ValidationException ex) { throw; } catch (PersonException ex) { throw; } catch (Exception ex) { throw; } }