Esempio n. 1
0
        public Boolean Add(int bookid)
        {
            try
            {
                IBookService bookService = new BookService();
                Book book = bookService.GetById(bookid);

                var bookRequest = new BookRequest();
                bookRequest.Book = book;

                IList<BookRequest> bookRequestList = new List<BookRequest>();
                bookRequestList.Add(bookRequest);

                IBookRequestDal bookRequestDal = new BookRequestDal();
                Boolean status = bookRequestDal.Add(bookRequestList);
                return status;
            }

            catch (Exception e)
            {
                Console.WriteLine("Error in BookRequestService, Add()");
                Console.Write(e.ToString());
                return false;
            }
        }
Esempio n. 2
0
 public UserBookRequest()
 {
     BookRequest = new BookRequest();
     User = new User();
     CreatedDateTime = DateTime.Now.ToString();
 }