Beispiel #1
0
        public PhoneDTO Create(PhoneDTO oPhoneDTO)
        {
            if (oPhoneDTO != null)
            {
                return(PhoneAssembler.ToDTO(oPhoneRepo.CreatePhone(PhoneAssembler.ToEntity(oPhoneDTO))));
            }

            return(null);
        }
Beispiel #2
0
        public PhoneDTO Update(PhoneDTO modelDTO)
        {
            PhoneDTO returnPhone = null;

            if (modelDTO != null && modelDTO.PhoneID > 0)
            {
                returnPhone = PhoneAssembler.ToDTO(phoneRepo.UpdatePhone(PhoneAssembler.ToEntity(modelDTO)));
            }

            return(returnPhone);
        }
Beispiel #3
0
        public PhoneDTO Update(PhoneDTO oPhoneDTO)
        {
            PhoneDTO returnPhone = null;

            if (oPhoneDTO != null && oPhoneDTO.PhoneID > 0)
            {
                oPhoneRepo.UpdatePhone(PhoneAssembler.ToEntity(oPhoneDTO));
                returnPhone = oPhoneDTO;
            }

            return(returnPhone);
        }