public void Update(PublisherInfo publisherInfo)
        {
            PublisherInfo publisher = this.GetPublisherByID(publisherInfo.ID);
            publisher.PublisherName = publisherInfo.PublisherName;
            publisher.PublisherIntroduction = publisherInfo.PublisherIntroduction;

            this.DataSource.SaveChanges();
        }
        public PublisherInfo GetEntity()
        {
            PublisherInfo publisher = new PublisherInfo();

            publisher.ID = this.ID;
            publisher.PublisherName = this.PublisherName;
            publisher.PublisherIntroduction = this.PublisherIntroduction;

            return publisher;
        }
        public static PublisherModel GetViewModel(PublisherInfo publisher)
        {
            PublisherModel model = new PublisherModel();

            model.ID = publisher.ID;
            model.PublisherName = publisher.PublisherName;
            model.PublisherIntroduction = publisher.PublisherIntroduction;

            IBookInfoDataProvider iBookInfoDataProvider = new BookInfoDataProvider();
            BookInfoCondition condition = new BookInfoCondition();
            condition.Publisher = publisher;

            if ( iBookInfoDataProvider.GetBookList(condition).Count() > 0)
            {
                model.IsUse = true;
            }

            return model;
        }
 public void Add(PublisherInfo publisherInfo)
 {
     this.DataSource.PublisherInfos.Add(publisherInfo);
     this.DataSource.SaveChanges();
 }