public BookServiceBase(IBookFactory bookFactory, IBookServices bookServices, IBookRepository repository) { _factory = bookFactory; _services = bookServices; _repository = repository; }
public void ThrowArgumentNullException_WhenPassedParametersAreNull() { // Arrange IBookServices bookServices = null; // Act & Assert Assert.Throws <ArgumentNullException>(() => new BookController(bookServices)); }
public BookController(IBookServices _book, IBookTypeServices _bookTypeServices, IPublishHouseServices _publishHouseServices) { book = _book; bookTypeServices = _bookTypeServices; publishHouseServices = _publishHouseServices; this.log = LogManager.GetLogger(Startup.repository.Name, typeof(HomeController)); }
public AuthorsController(IAuthorServices services, IBookServices bookServices, IFileServices fileServices, IParameterBuilder parameterBuilder) { _services = services; _bookServices = bookServices; _fileServices = fileServices; _parameterBuilder = parameterBuilder; }
public IActionResult GetBookById([FromServices] IBookServices bookServices, [FromRoute] int bookId) { var book = bookServices.GetBookById(bookId); if (book == null) { return(NotFound()); } return(new JsonResult(book)); }
public RentalsController( IRentalServices rentalServices, IParameterBuilder parameterBuilder, ICustomerServices customerServices, IBookServices bookServices) { _rentalServices = rentalServices; _customerServices = customerServices; _bookServices = bookServices; _parameterBuilder = parameterBuilder; }
public BookController(IBookServices bookServices, IAuthorServices authorServices, IUserBookServices userBookServices, UserManager <User> userManager ) { this.bookServices = bookServices; this.authorServices = authorServices; this.userBookServices = userBookServices; this.userManager = userManager; }
public BooksController(IBookServices services, IAuthorServices authorServices, IGenreServices genreServices, IParameterBuilder parameterBuilder, IFileServices fileServices) { _services = services; _authorServices = authorServices; _genreServices = genreServices; _fileServices = fileServices; _parameterBuilder = parameterBuilder; }
public BookController(IBookServices bookServices, IResourceServices resourceServices, IWebHostEnvironment webHostEnvironment, IConfiguration configuration, ISearchServices searchServices) { _configuration = configuration; _resourceServices = resourceServices; _bookServices = bookServices; _searchServices = searchServices; _webHostEnvironment = webHostEnvironment; }
public UserController(UserManager <User> userManager, SignInManager <User> signInManager, IUserServices userServices, IUserBookServices userBookServices, IBookServices bookServices) { this.userManager = userManager; this.signInManager = signInManager; this.userServices = userServices; this.userBookServices = userBookServices; this.bookServices = bookServices; }
public IActionResult DeleteBook([FromServices] IBookServices bookServices, [FromRoute] int bookId) { var deleteCount = bookServices.DeleteBook(bookId); if (deleteCount > 0) { return(Ok()); } else { return(NotFound()); } }
public IActionResult UpdateBook([FromServices] IBookServices bookServices, [FromRoute] int bookId, Book book) { var updateCount = bookServices.UpdateBook(bookId, book); if (updateCount > 0) { return(Ok()); } else { return(NotFound()); } }
public IActionResult AddBook([FromServices] IBookServices bookServices, Book book) { var bookId = bookServices.AddBook(book); if (bookId > 0) { return(Created($"/api/books/book/{book.ID}", book)); } else { return(NotFound()); } }
public BookDetailPresenter(IBookDetailView view, IBookServices bookService, IPictureServices pictureService) : base(view) { Guard.WhenArgument(view, "View is null.").IsNull().Throw(); Guard.WhenArgument(bookService, "Book service is null.").IsNull().Throw(); Guard.WhenArgument(pictureService, "Picture service is null.").IsNull().Throw(); this.bookService = bookService; this.pictureService = pictureService; this.View.OnGetBooksById += View_OnGetBooksById; this.View.OnGetPicturesByBookId += View_OnGetPicturesByBookId; }
public RestApiController( IUserBookServices userBookServices, IUserServices userServices, IJsonServices jsonServices, IXmlServices xmlServices, ICsvServices csvServices, IQrCodeServices qrCodeServices, IBookServices bookServices) { this.userBookServices = userBookServices; this.userServices = userServices; this.jsonServices = jsonServices; this.xmlServices = xmlServices; this.csvServices = csvServices; this.qrCodeServices = qrCodeServices; this.bookServices = bookServices; }
public BookCreatorPresenter( IBookCreatorView view, IAuthorServices authorService, IBookServices bookService, IGenreServices genreService, IPublisherServices publisherService) : base(view) { Guard.WhenArgument(view, "View is null.").IsNull().Throw(); Guard.WhenArgument(authorService, "Author service is null.").IsNull().Throw(); Guard.WhenArgument(bookService, "Book service is null.").IsNull().Throw(); Guard.WhenArgument(genreService, "Genre service is null.").IsNull().Throw(); Guard.WhenArgument(publisherService, "Publisher service is null.").IsNull().Throw(); this.authorService = authorService; this.bookService = bookService; this.genreService = genreService; this.publisherService = publisherService; }
public BookSearcherPresenter( IBookSearcherView view, IAuthorServices authorService, IBookServices bookService, IGenreServices genreService, IPublisherServices publisherService) : base(view) { Guard.WhenArgument(authorService, "Author service is null.").IsNull().Throw(); Guard.WhenArgument(bookService, "Book service is null.").IsNull().Throw(); Guard.WhenArgument(genreService, "Genre service is null.").IsNull().Throw(); Guard.WhenArgument(publisherService, "Publisher service is null.").IsNull().Throw(); this.authorService = authorService; this.bookService = bookService; this.genreService = genreService; this.publisherService = publisherService; this.View.OnAuthorsGetData += View_OnAuthorsGetData; this.View.OnGenresGetData += View_OnGenresGetData; this.View.OnPublishersGetData += View_OnPublishersGetData; }
public BooksController(IBookServices BookServices) { bookServices = BookServices; }
public BooksController(IBookServices bookServices) { _bookServices = bookServices; }
public BookController(IBookServices objBookServices) { _objBookServices = objBookServices; }
public BookRemover(IBookFactory bookFactory, IBookServices bookServices, IBookRepository repository) : base(bookFactory, bookServices, repository) { }
public BookController(IBookServices services, CategoryService categoryService) { this.bookservices = services; this.categoryService = categoryService; }
public BookController(IBookServices s) { bService = s; }
public BookController(IBookServices bookServices) { this.bookService = bookServices; }
public BooksController(IBookServices bookService) { _bookServices = bookService; }
public BookController(IBookServices bookServices) { _service = bookServices; }
public AuthorsController(IAuthorService authorService, IBookServices bookService) { this.authorsService = authorService; this.bookService = bookService; }
public MembersController(IMemberService memberService, ILoanService loanService, IBookServices bookServices) { this.bookServices = bookServices; this.loanService = loanService; this.memberService = memberService; }
public BookServicesController( IBookServices repo ) { _repo = repo; }
public HomeController(IHomePageServices homePageServices, ISearchService searchService, IBookServices bookServices) { _homePageServices = homePageServices; _searchService = searchService; _bookService = bookServices; }
public BookController(IBookServices bookServices, ILogger <BookController> logger) { _bookServices = bookServices; _logger = logger; }