Пример #1
0
 public BookInfoService(ILogger <BookInfoService> logger,
                        IBookInfoRepository bookInfoRepository,
                        IFreeSql <DBFlagMain> fsq,
                        ICommonAttachService commonAttachServices) : base(bookInfoRepository, logger)
 {
     _bookInfoRepository   = bookInfoRepository;
     _commonAttachServices = commonAttachServices;
     _fsq = fsq;
 }
 public QuotesController(ILogger <QuotesController> logger, IMailService mailService,
                         IBookInfoRepository bookInfoRepository,
                         IMapper mapper)
 {
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
     _mailService        = mailService ?? throw new ArgumentNullException(nameof(mailService));
     _bookInfoRepository = bookInfoRepository ?? throw new ArgumentNullException(nameof(bookInfoRepository));
     _mapper             = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 public BookService(
     IBookInfoRepository infoRepository,
     IBookSheetsRepository sheetsRepository,
     IBookContentsRepository contentsRepository,
     IBookNotesRepository notesRepository)
 {
     _sheetsRepository   = sheetsRepository;
     _infoRepository     = infoRepository;
     _contentsRepository = contentsRepository;
     _notesRepository    = notesRepository;
 }
Пример #4
0
 public BookService(
     IBookInfoRepository infoRepository,
     IBookSheetsRepository sheetsRepository,
     IBookContentsRepository contentsRepository,
     IBookNotesRepository notesRepository)
 {
     _sheetsRepository   = sheetsRepository ?? throw new ArgumentNullException(nameof(sheetsRepository));
     _infoRepository     = infoRepository ?? throw new ArgumentNullException(nameof(infoRepository));
     _contentsRepository = contentsRepository ?? throw new ArgumentNullException(nameof(contentsRepository));
     _notesRepository    = notesRepository ?? throw new ArgumentNullException(nameof(notesRepository));
 }
Пример #5
0
 public BooksController(IBookInfoRepository bookInfoRepository, IMapper mapper)
 {
     _bookInfoRepository = bookInfoRepository ?? throw new ArgumentNullException(nameof(bookInfoRepository));
     _mapper             = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 // Unit test constructor - mock data comes in, sono database/Entity Framework is used
 public bookInfoController(IBookInfoRepository mockRepo)
 {
     this.db = mockRepo;
 }
 // Default constructor - use the database/Entity Framework
 public bookInfoController()
 {
     this.db = new EFBookInfoRepository();
 }
 private static BookService GetSut(
     IBookInfoRepository infoRepository,
     IBookSheetsRepository sheetsRepository,
     IBookContentsRepository contentsRepository,
     IBookNotesRepository notesRepository) =>
 new BookService(infoRepository, sheetsRepository, contentsRepository, notesRepository);
Пример #9
0
 public BookInfoAppService(IBookInfoRepository repository
                           , IRepository <Libary, long> libRepository) : base(repository)
 {
     _libRepository = libRepository;
 }
 public BookService(IBookInfoRepository bookInfoRepository)
 {
     _bookInfoRepository = bookInfoRepository;
 }