예제 #1
0
        public void EditPublisher(PublisherDTO publisherDTO)
        {
            var publisher = _unitOfWork.PublisherRepository.GetByID(publisherDTO.Id);

            _unitOfWork.PublisherRepository.Update(publisher);
            publisher.Name = publisherDTO.Name;
            _unitOfWork.Commit();
        }
예제 #2
0
 public bool IsExistPublisher(PublisherDTO publisherDTO)
 {
     return(_unitOfWork.PublisherRepository.Get(p => p.Name == publisherDTO.Name).Count() != 0);
 }
예제 #3
0
 public void AddPublisher(PublisherDTO publisherDTO)
 {
     _unitOfWork.PublisherRepository.Insert(_mapper.Map <Publisher>(publisherDTO));
     _unitOfWork.Commit();
 }