public EditBookViewModel GetBookForEditById(int bookId)
        {
            var result = _bookRepository.GetBook(bookId);
            var model  = new EditBookViewModel();

            model.Id               = result.Id;
            model.Name             = result.Name;
            model.Author           = result.Author;
            model.Publisher        = result.Publisher;
            model.YearOfPublishing = result.YearOfPublishing;
            //model.IncludeInHomePage = result.IncludeInHomePage;
            return(model);
        }
Exemple #2
0
 public Book GetBook(int id)
 {
     return(_bookRepository.GetBook(id));
 }