public BookAuthorModel GetBookAuthorById(int bookid, int authorid) { var book=this.bookFacade.GetBookById(bookid); var author = this.authorFacade.GetAuthorById(authorid); if (book == null) { return null; } if (author == null) { return null; } var bookauthor = new BookAuthorModel { BookName = book.Name, AuthorName = author.FirstName + " " + author.LastName, BookId = book.Id, AuthorId = author.Id }; return bookauthor; }