Exemplo n.º 1
0
        public void CanParseHtml()
        {
            // https://www.carlrippon.com/testing-ef-core-repositories-with-xunit-and-an-in-memory-db/
            DbContextOptions <FlashCardContext> options;
            var builder = new DbContextOptionsBuilder <FlashCardContext>();

            builder.UseInMemoryDatabase("FlashCardDB");
            options = builder.Options;
            FlashCardContext dtaContext = new FlashCardContext(options);

            dtaContext.Database.EnsureDeleted();
            dtaContext.Database.EnsureCreated();

            DNCScrapper scrapper = new DNCScrapper(new WebScrappingDataManager(dtaContext));
            //   scrapper.StartAsync(new System.Threading.CancellationToken());
        }
Exemplo n.º 2
0
 public HomeController(FlashCardContext context)
 {
     dbContext = context;
 }
Exemplo n.º 3
0
 public FlashCardManager(FlashCardContext context) : base(context)
 {
 }
 public WebScrappingDataManager(FlashCardContext dataContext) : base(dataContext)
 {
 }
 public CardsController(FlashCardContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public BaseManager(FlashCardContext dataContext)
 {
     DataContext = dataContext;
 }