protected void btnAddTitle_Click(object sender, EventArgs e) { AddBookTitleRequest request = new AddBookTitleRequest(); request.ISBN = txtBookISBN.Text; request.Title = txtBookTitle.Text; LibraryService service = ServiceFactory.CreateLibraryService(); service.AddBookTitle(request); DisplayBooks(); }
public AddBookTitleResponse AddBookTitle(AddBookTitleRequest request) { AddBookTitleResponse response = new AddBookTitleResponse(); BookTitle bookTitle = new BookTitle(); bookTitle.ISBN = request.ISBN; bookTitle.Title = request.Title; _bookTitleRepository.Add(bookTitle); _uow.Commit(); response.Success = true; return response; }