-
-
Save christiannagel/3b56296747d5ab4830008819e19e7ab9 to your computer and use it in GitHub Desktop.
Injecting services into the books service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BooksService : ItemsService<Book> | |
{ | |
private readonly IRepository<Book, int> _booksRepository; | |
public BooksService( | |
IRepository<Book, int> booksRepository, | |
ISharedItems<Book> booksItems, | |
ILoggerFactory loggerFactory) | |
: base(booksItems, loggerFactory) | |
{ | |
_booksRepository = booksRepository ?? throw new ArgumentNullException(nameof(booksRepository)); | |
} | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment