コード例 #1
0
ファイル: BookService.cs プロジェクト: DenisDVG/Library.Web
        public void InsertBook(AddBookViewModel view, Publication publication)
        {
            var bookNew = new Book();

            bookNew.Author         = view.Author;
            bookNew.NumberPages    = view.NumberPages;
            bookNew.Publication    = publication;
            bookNew.PublishingYear = view.PublishingYear;
            _bookRepository.Insert(bookNew);
            _bookRepository.Save();
        }