public void AddBorrowBook(BookMember bookMember)
 {
     _databaseConnection.connection.Execute(@"
         insert into BorrowBook(BookId, MemberId, BorrowDate) 
         values (@BookId, @MemberId, @BorrowDate)",
                                            bookMember);
 }
Exemplo n.º 2
0
        public IActionResult BorrowBook([FromBody] BookMember bookMember)
        {
            var validator = new BookMemberValidator();

            if (validator.Validate(bookMember).IsValid)
            {
                _bookService.BorrowBook(bookMember);
                return(Ok());
            }
            return(BadRequest());
        }
Exemplo n.º 3
0
 public void BorrowBook(BookMember bookMember)
 {
     _bookMemberRepository.AddBorrowBook(bookMember);
 }