Ejemplo n.º 1
0
        public bool Update(DoctorAttachmentDto attachmentDto)
        {
            if (attachmentDto == null)
            {
                throw new ArgumentNullException();
            }
            bool             result           = false;
            DoctorAttachment doctorAttachment = Mapper.Map <DoctorAttachment>(attachmentDto);

            doctorAttachment.isBinding = true;
            TheUnitOfWork.DoctorAttachmentRepo.Update(doctorAttachment);
            result = TheUnitOfWork.SaveChanges() > new int();
            return(result);
        }
Ejemplo n.º 2
0
        public DoctorAttachmentDto Insert(DoctorAttachmentDto doctorDto)
        {
            if (doctorDto == null)
            {
                throw new ArgumentNullException();
            }
            DoctorAttachment doctor = Mapper.Map <DoctorAttachment>(doctorDto);

            doctor.isBinding = true;
            TheUnitOfWork.DoctorAttachmentRepo.Insert(doctor);
            TheUnitOfWork.SaveChanges();
            doctorDto.DoctorId = doctor.DoctorId;
            return(doctorDto);
        }