Exemplo n.º 1
0
        static void Main(string[] args)
        {
            string       gbcachefolder    = "D:\\gutenberg\\cache\\epub";
            const string connectionString = "mongodb://localhost:27017/ebookdb";

            var databaseContext = new DatabaseContext(connectionString);

            ebookRepository = new EbookRepository(databaseContext);

            Log.Logger = new LoggerConfiguration()
                         .WriteTo.File("gutenberg_parser.log")
                         .CreateLogger();
            Log.Information("Parse started");

            processFolder(gbcachefolder);

            Log.Information("Parse ended");
        }
Exemplo n.º 2
0
 public EbookService(IEbookRepository ebookRepository, IUnitOfWork unitOfWork)
 {
     this.ebookRepository = ebookRepository;
     this.unitOfWork      = unitOfWork;
 }
 public EbooksController(ILogger <EbooksController> logger, IEbookRepository ebookRepository)
 {
     _logger          = logger;
     _ebookRepository = ebookRepository;
 }