protected override void TearDown() { var db = new PerformanceTest(); using (var ts = new TransactionScope()) { db.Delete(db.Simplests); db.SaveChanges(); ts.Complete(); } }
protected override void OpenSession() { context = new PerformanceTest(); }
static IQueryable GetSimplestPage(PerformanceTest context, long idFrom, int pageSize) { var query = from e in context.Simplests where e.Id >= idFrom select e; return query.Take(pageSize); }
static IQueryable GetAllSimplest(PerformanceTest context) { return context.Simplests.Where(s => s.Id > 0); }
static IQueryable GetSimplest(PerformanceTest context, long id) { var query = from e in context.Simplests where e.Id == id select e; return query; }