public PhoneDTO Create(PhoneDTO oPhoneDTO) { if (oPhoneDTO != null) { return(PhoneAssembler.ToDTO(oPhoneRepo.CreatePhone(PhoneAssembler.ToEntity(oPhoneDTO)))); } return(null); }
public PhoneDTO Update(PhoneDTO modelDTO) { PhoneDTO returnPhone = null; if (modelDTO != null && modelDTO.PhoneID > 0) { returnPhone = PhoneAssembler.ToDTO(phoneRepo.UpdatePhone(PhoneAssembler.ToEntity(modelDTO))); } return(returnPhone); }
public PhoneDTO Update(PhoneDTO oPhoneDTO) { PhoneDTO returnPhone = null; if (oPhoneDTO != null && oPhoneDTO.PhoneID > 0) { oPhoneRepo.UpdatePhone(PhoneAssembler.ToEntity(oPhoneDTO)); returnPhone = oPhoneDTO; } return(returnPhone); }