public void Cleanup() { using (var context = new BiometContext()) { context.Employees.RemoveRange(context.Employees); context.SaveChanges(); } }
public void CleanUp() { using (var db = new BiometContext()) { db.Employees.RemoveRange(db.Employees); db.SaveChanges(); } }
public void TestMethod1() { using (var context = new BiometContext()) { context.Employees.Add(new SalariedEmployee { EmployeeNumber = "888", MonthlySalary = 30000, FirstName = "Archie" }); context.SaveChanges(); DTRRepository dTRRepository = new DTRRepository(context); dTRRepository.Get("888", DateTime.Now.Date); } }
public void CanAccessDb() { using (var db = new BiometContext()) { db.Employees.Add(new SalariedEmployee { MonthlySalary = 14000 }); db.SaveChanges(); } using (var db = new BiometContext()) { Assert.IsTrue(db.Employees.ToList().Any()); } }