public int AddBenificiaryMember(BenificiaryMemberDTO dto) { int id = 0; try { log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto)); R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto); // add id = Repository.AddBenificiaryMember(t); log.Debug("result: 'success', id: " + id); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } return(id); }
public void DeleteBenificiaryMember(BenificiaryMemberDTO dto) { try { log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto)); R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto); // delete Repository.DeleteBenificiaryMember(t); log.Debug("result: 'success'"); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } }
public void UpdateBenificiaryMember(BenificiaryMemberDTO dto) { try { //Requires.NotNull(t); //Requires.PropertyNotNegative(t, "BenificiaryMemberId"); log.Debug(BenificiaryMemberDTO.FormatBenificiaryMemberDTO(dto)); R_BenificiaryMember t = BenificiaryMemberDTO.ConvertDTOtoEntity(dto); // update Repository.UpdateBenificiaryMember(t); log.Debug("result: 'success'"); } catch (System.Exception e) { // error log.Error(e.ToString()); throw; } }