public void OperateBoth() { using (new SessionScope()) { var blogs = Blog.FindAll().ToArray(); var hands = Hand.FindAll().ToArray(); Assert.AreEqual(0, blogs.Length); Assert.AreEqual(0, hands.Length); CreateBlog(); CreateHand(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count <Blog>()); Assert.AreEqual(1, scope.Count <Hand>()); } }
public void OperateBoth() { using (new SessionScope()) { var blogs = Blog.FindAll().ToArray(); var hands = Hand.FindAll().ToArray(); Assert.AreEqual(0, blogs.Length); Assert.AreEqual(0, hands.Length); CreateBlog(); CreateHand(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count<Blog>()); Assert.AreEqual(1, scope.Count<Hand>()); } }
public void OperateBoth() { using (var scope = new SessionScope()) { var blogs = scope.FindAll <Blog>().ToArray(); var authors = scope.FindAll <Author>().ToArray(); Assert.AreEqual(0, blogs.Length); Assert.AreEqual(0, authors.Length); CreateBlog(); CreateAuthor(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count <Blog>()); Assert.AreEqual(1, scope.Count <Author>()); } }
public void OperateBoth() { using (var scope = new SessionScope()) { var blogs = scope.FindAll<Blog>().ToArray(); var authors = scope.FindAll<Author>().ToArray(); Assert.AreEqual(0, blogs.Length); Assert.AreEqual(0, authors.Length); CreateBlog(); CreateAuthor(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count<Blog>()); Assert.AreEqual(1, scope.Count<Author>()); } }
public void OperateTheOtherOne() { using (new SessionScope()) { var hands = Hand.FindAll().ToArray(); Assert.AreEqual(0, hands.Length); CreateHand(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count <Hand>()); } }
public void OperateTheOtherOne() { using (new SessionScope()) { var hands = Hand.FindAll().ToArray(); Assert.AreEqual(0, hands.Length); CreateHand(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count<Hand>()); } }
public void OperateTheOtherOne() { using (new SessionScope()) { var authors = AR.FindAll <Author>().ToArray(); Assert.AreEqual(0, authors.Length); CreateAuthor(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count <Author>()); } }
public void OperateTheOtherOne() { using (new SessionScope()) { var authors = AR.FindAll<Author>().ToArray(); Assert.AreEqual(0, authors.Length); CreateAuthor(); } using (var scope = new SessionScope()) { Assert.AreEqual(1, scope.Count<Author>()); } }