コード例 #1
0
ファイル: Program.cs プロジェクト: yahyaerdoan/MyBooksStore
        static void Main(string[] args)
        {
            //GetAll();
            //TopluUrunEkleme(bookManager);
            //TekUrunEkleme(bookManager);
            //YayınEviEkleme(publishingHouseManager);
            //Guncelleme();
            //UrunSilme();

            BookManager bookManager = new BookManager(new EfBookDal());

            bookManager.GetBooksByPublishingHouseId(4);
            foreach (var book in bookManager.GetBooksByPublishingHouseId(4))
            {
                Console.WriteLine(book.BookId + " / " + book.BookName);
            }



            PublishingHouseManager publishingHouseManager = new PublishingHouseManager(new EfPublishingHouseDal());

            publishingHouseManager.GetPublishingHouseById(5);
            foreach (var publishingHouse in publishingHouseManager.GetPublishingHouseById(5))
            {
                Console.WriteLine(publishingHouse.PublishingHouseId + " / " + publishingHouse.PublishingHouseName);
            }


            TypeOfBookManager typeOfBookManager = new TypeOfBookManager(new EfTypeOfBookDal());

            typeOfBookManager.Add(new TypeOfBook {
                TypeOfBookName = "Öykü"
            });
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: yahyaerdoan/MyBooksStore
        private static void YayınEviEkleme(PublishingHouseManager publishingHouseManager)
        {
            List <PublishingHouse> publishingHouses = new List <PublishingHouse>
            {
                new PublishingHouse {
                    PublishingHouseId = 5, PublishingHouseName = "YKY"
                }
            };

            foreach (var publishingHouse in publishingHouses)
            {
                publishingHouseManager.Add(publishingHouse);
            }
        }