public void EditPublisher(PublisherDTO publisherDTO) { var publisher = _unitOfWork.PublisherRepository.GetByID(publisherDTO.Id); _unitOfWork.PublisherRepository.Update(publisher); publisher.Name = publisherDTO.Name; _unitOfWork.Commit(); }
public bool IsExistPublisher(PublisherDTO publisherDTO) { return(_unitOfWork.PublisherRepository.Get(p => p.Name == publisherDTO.Name).Count() != 0); }
public void AddPublisher(PublisherDTO publisherDTO) { _unitOfWork.PublisherRepository.Insert(_mapper.Map <Publisher>(publisherDTO)); _unitOfWork.Commit(); }