public void Check11UpdateEfDirectOk() { int postId; using (var db = new SampleWebAppDb()) postId = db.Posts.AsNoTracking().First().PostId; using (var db = new SampleWebAppDb()) { //SETUP var timer = new Stopwatch(); timer.Start(); //ATTEMPT db.UpdatePostEfDirect(postId); timer.Stop(); //VERIFY Console.WriteLine("Ef operation took {0} ms", timer.ElapsedMilliseconds); } }
public void Check11UpdateEfDirectOk() { using (var db = new SampleWebAppDb()) { //SETUP var snap = new DbSnapShot(db); var id = db.Posts.First().PostId; //ATTEMPT db.UpdatePostEfDirect(id); //VERIFY db.Posts.Count().ShouldEqual(snap.NumPosts); } }