public BillsController(BillVuDbContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } _context = context; }
public DbContextFixture() { var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <BillVuDbContext>() .UseSqlite(connection) .Options; DbContext = new BillVuDbContext(options); DbContext.Database.EnsureCreated(); }