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>()); } }