//[TestMethod] //public async Task TestExpenses() //{ //} public void Dispose() { if (_ctx != null) { _ctx.Dispose(); _ctx = null; } }
public void TestCreate() { Database.SetInitializer(new BasicContentInitializer()); using (var db = new ExpensesDbContext()) { var clients = db.Clients; Assert.AreEqual(1, db.Clients.Count(), "We should have one client"); } }
protected void CreateDbContext() { DbContext = new ExpensesDbContext(); // TODO: Set any options here }
public ExpenseRepository(ExpensesDbContext dbContext) { _dbContext = dbContext; }