public AuthorService(IAuthorRepository artistRepository, IBookRepository itemRepository, IAuthorMapper artistMapper, IBookMapper itemMapper) { _artistRepository = artistRepository; _itemRepository = itemRepository; _artistMapper = artistMapper; _itemMapper = itemMapper; }
public AuthorModelService(IAuthorService service, IAuthorMapper mapper) { if (service == null || mapper == null) { throw new ArgumentNullException("Cannot pass null as argument for AuthorModelService constructor"); } _mapper = mapper; _service = service; }
public BookShopContextFactory() { var contextOptions = new DbContextOptionsBuilder <BookShopContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; EnsureCreation(contextOptions); ContextInstance = new TestBookShopContext(contextOptions); GenreMapper = new GenreMapper(); ArtistMapper = new AuthorMapper(); BookMapper = new BookMapper(ArtistMapper, GenreMapper); }
public BookMapper(IAuthorMapper authorMapper, IGenreMapper genreMapper) { _authorMapper = authorMapper; _genreMapper = genreMapper; }
public BookMapper(IAuthorMapper authorMapper) { _authorMapper = authorMapper; }