Exemple #1
0
 public BookService()
 {
     _applicationContext        = new ApplicationContext();
     _bookRepository            = new BookRepository(_applicationContext);
     _publishingHouseRepository = new PublishingHouseRepository(_applicationContext);
     _publicationInPublisihngHouseRepository = new PublicationInPublisihngHouseRepository(_applicationContext);
     _publicationRepository         = new PublicationRepository(_applicationContext);
     _publicationInPublisihngHouses = _publicationInPublisihngHouseRepository.Get(/*includeProperties: "PublishingHouse, Publication"*/).ToList();
     _books            = _bookRepository.Get(includeProperties: "Publication").ToList();
     _publishingHouses = _publishingHouseRepository.Get().ToList();
     _publications     = _publicationRepository.Get().ToList();
 }
 public GeneralService()
 {
     _applicationContext        = new ApplicationContext();
     _bookRepository            = new BookRepository(_applicationContext);
     _magazineRepository        = new MagazineRepository(_applicationContext);
     _brochureRepository        = new BrochureRepository(_applicationContext);
     _publishingHouseRepository = new PublishingHouseRepository(_applicationContext);
     _publicationInPublisihngHouseRepository = new PublicationInPublisihngHouseRepository(_applicationContext);
     _publicationRepository         = new PublicationRepository(_applicationContext);
     _publicationInPublisihngHouses = _publicationInPublisihngHouseRepository.Get().ToList();
     _books            = _bookRepository.Get(includeProperties: "Publication").ToList();
     _publishingHouses = _publishingHouseRepository.Get().ToList();
     _publications     = _publicationRepository.Get().ToList();
 }