public CardControllerTests()
        {
            optionsBuilder = new DbContextOptionsBuilder <FlashcardContext>();
            optionsBuilder.UseInMemoryDatabase("UnitTestMemoryDB");
            dbContext = new FlashcardContext(optionsBuilder.Options);

            cardsController = new CardsController(dbContext);
        }
Example #2
0
 public UserRepository(FlashcardContext context) : base(context)
 {
     InitialRecords();
 }
Example #3
0
 public BaseRepository(FlashcardContext context)
 {
     _dbContext = context;
 }
Example #4
0
 public DecksController(FlashcardContext context)
 {
     _context = context;
 }
Example #5
0
 public CardRepository(FlashcardContext context) : base(context)
 {
     LoadDefaultItems();
 }
 public CardsController(FlashcardContext context) => _context = context;