Beispiel #1
0
        public void UpdateBook(BookBusinessModel book)
        {
            var mapper = new BookMapper();

            this.uow.Items.Update(mapper.Map(book));
            this.uow.Commit();
        }
Beispiel #2
0
        public void CreateBook(BookBusinessModel book)
        {
            var mapper  = new BookMapper();
            var bookNew = mapper.Map(book);

            this.uow.Items.Add(bookNew);
            this.uow.Commit();

            book.Id = bookNew.Id; // updates the book.Id to Id value from DB
        }
Beispiel #3
0
        public ActionResult Edit_old(BookBusinessModel viewModel)
        {
            if (ModelState.IsValid)
            {
                this.bookInfoManager.UpdateBook(viewModel);

                return(RedirectToAction("Details", new { id = viewModel.Id }));
            }

            return(View(viewModel));
        }
Beispiel #4
0
 public void RemoveBook(BookBusinessModel book)
 {
     this.bookFacade.RemoveById(book.Id);
 }
Beispiel #5
0
 public void CreateBook(BookBusinessModel book)
 {
     this.bookFacade.CreateBook(book);
 }
Beispiel #6
0
 public void UpdateBook(BookBusinessModel book)
 {
     this.bookFacade.UpdateBook(book);
 }