diff --git a/Tools/packages.config b/Tools/packages.config
index 6d41f85d78e..cf6de7cecb7 100644
--- a/Tools/packages.config
+++ b/Tools/packages.config
@@ -7,7 +7,7 @@
-
+
diff --git a/src/AsyncGenerator.yml b/src/AsyncGenerator.yml
index 881e7096216..a4d096948b0 100644
--- a/src/AsyncGenerator.yml
+++ b/src/AsyncGenerator.yml
@@ -181,30 +181,10 @@
methodConversion:
- conversion: Copy
name: AfterTransactionCompletionProcess_EvictsFromCache
- - conversion: Copy
- hasAttributeName: OneTimeSetUpAttribute
- - conversion: Copy
- hasAttributeName: OneTimeTearDownAttribute
- - conversion: Copy
- hasAttributeName: SetUpAttribute
- - conversion: Copy
- hasAttributeName: TearDownAttribute
- - conversion: Smart
- hasAttributeName: TestAttribute
- - conversion: Smart
- hasAttributeName: TheoryAttribute
asyncExtensionMethods:
projectFiles:
- fileName: LinqExtensionMethods.cs
projectName: NHibernate
- preserveReturnType:
- - hasAttributeName: TestAttribute
- - hasAttributeName: TheoryAttribute
- alwaysAwait:
- - hasAttributeName: TestAttribute
- - hasAttributeName: TheoryAttribute
- - hasAttributeName: SetUpAttribute
- - hasAttributeName: TearDownAttribute
typeConversion:
- conversion: Ignore
name: ObjectAssert
@@ -214,32 +194,24 @@
name: MultiThreadRunner
- conversion: Ignore
name: PeVerifier
- - conversion: Ignore
- hasAttributeName: IgnoreAttribute
- - conversion: NewType
- hasAttributeName: TestFixtureAttribute
- - conversion: NewType
- anyBaseTypeRule: HasTestFixtureAttribute
- conversion: Ignore
rule: IsTestCase
- conversion: Ignore
anyBaseTypeRule: IsTestCase
- ignoreSearchForMethodReferences:
- - hasAttributeName: TheoryAttribute
- - hasAttributeName: TestAttribute
ignoreDocuments:
- filePathEndsWith: Linq/MathTests.cs
- filePathEndsWith: Linq/ExpressionSessionLeakTest.cs
- filePathEndsWith: Linq/NorthwindDbCreator.cs
cancellationTokens:
- withoutCancellationToken:
- - hasAttributeName: TestAttribute
- - hasAttributeName: TheoryAttribute
+ enabled: true
scanMethodBody: true
scanForMissingAsyncMembers:
- all: true
registerPlugin:
- - type: AsyncGenerator.Core.Plugins.NUnitAsyncCounterpartsFinder
+ - type: AsyncGenerator.Core.Plugins.NUnitPlugin
+ parameters:
+ - name: createNewTypes
+ value: true
assemblyName: AsyncGenerator.Core
- type: AsyncGenerator.Core.Plugins.TransactionScopeAsyncFlowAdder
assemblyName: AsyncGenerator.Core
@@ -302,6 +274,3 @@ typeRules:
- filters:
- name: TestCase
name: IsTestCase
-- filters:
- - hasAttributeName: TestFixtureAttribute
- name: HasTestFixtureAttribute
diff --git a/src/NHibernate.Test/Async/Ado/BatcherFixture.cs b/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
index 89b61255596..a21e4c918e0 100644
--- a/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
+++ b/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
@@ -102,44 +102,7 @@ public async Task OneRoundTripUpdateAsync()
await (CleanupAsync());
}
-#if NETFX
- [Test, Ignore("Not fixed yet.")]
- [Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
- public async Task SqlClientOneRoundTripForUpdateAndInsertAsync()
- {
- if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
- Assert.Ignore("This test is for SqlClientBatchingBatcher only");
-
- await (FillDbAsync());
-
- using (var sqlLog = new SqlLogSpy())
- using (ISession s = Sfi.OpenSession())
- using (ITransaction tx = s.BeginTransaction())
- {
- await (s.SaveAsync(new VerySimple
- {
- Name = "test441",
- Weight = 894
- }));
-
- await (s.SaveAsync(new AlmostSimple
- {
- Name = "test441",
- Weight = 894
- }));
-
- await (tx.CommitAsync());
-
- var log = sqlLog.GetWholeLog();
- //log should only contain NHibernate.SQL once, because that means
- //that we ony generated a single batch (NHibernate.SQL log will output
- //once per batch)
- Assert.AreEqual(0, log.IndexOf("NHibernate.SQL"), "log should start with NHibernate.SQL");
- Assert.AreEqual(-1, log.IndexOf("NHibernate.SQL", "NHibernate.SQL".Length), "NHibernate.SQL should only appear once in the log");
- }
-
- await (CleanupAsync());
- }
+ #if NETFX
[Test]
[Description("SqlClient: The batcher log output should be formatted")]
diff --git a/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs b/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
index 741992bf116..41b7770e63e 100644
--- a/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
+++ b/src/NHibernate.Test/Async/CacheTest/BatchableCacheFixture.cs
@@ -866,14 +866,14 @@ public async Task QueryCacheTestAsync()
[TestCase(true)]
[TestCase(false)]
- public async Task QueryEntityBatchCacheTestAsync(bool clearEntityCacheAfterQuery, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task QueryEntityBatchCacheTestAsync(bool clearEntityCacheAfterQuery)
{
var persister = Sfi.GetEntityPersister(typeof(ReadOnlyItem).FullName);
var cache = (BatchableCache) persister.Cache.Cache;
var queryCache = GetDefaultQueryCache();
Sfi.Statistics.Clear();
- await (Sfi.EvictQueriesAsync(cancellationToken));
+ await (Sfi.EvictQueriesAsync());
cache.ClearStatistics();
queryCache.ClearStatistics();
@@ -884,9 +884,9 @@ public async Task QueryCacheTestAsync()
{
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
- .ToListAsync(cancellationToken));
+ .ToListAsync());
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(1), "Unexpected query cache GetCalls");
@@ -903,7 +903,7 @@ public async Task QueryCacheTestAsync()
if (clearEntityCacheAfterQuery)
{
- await (cache.ClearAsync(cancellationToken));
+ await (cache.ClearAsync(CancellationToken.None));
}
Sfi.Statistics.Clear();
@@ -913,9 +913,9 @@ public async Task QueryCacheTestAsync()
{
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
- .ToListAsync(cancellationToken));
+ .ToListAsync());
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(1), "Unexpected query cache GetCalls");
@@ -935,7 +935,7 @@ public async Task QueryCacheTestAsync()
[TestCase(false, false)]
[TestCase(true, true)]
[TestCase(false, true)]
- public async Task QueryFetchCollectionBatchCacheTestAsync(bool clearEntityCacheAfterQuery, bool future, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task QueryFetchCollectionBatchCacheTestAsync(bool clearEntityCacheAfterQuery, bool future)
{
if (future && !Sfi.ConnectionProvider.Driver.SupportsMultipleQueries)
{
@@ -954,19 +954,19 @@ public async Task QueryCacheTestAsync()
using (var s = OpenSession())
{
- var ids = await (s.Query().Select(o => o.Id).OrderBy(o => o).ToListAsync(cancellationToken));
+ var ids = await (s.Query().Select(o => o.Id).OrderBy(o => o).ToListAsync());
middleId = ids[2];
}
Sfi.Statistics.Clear();
- await (Sfi.EvictQueriesAsync(cancellationToken));
+ await (Sfi.EvictQueriesAsync());
queryCache.ClearStatistics();
cache.ClearStatistics();
- await (cache.ClearAsync(cancellationToken));
+ await (cache.ClearAsync(CancellationToken.None));
itemCache.ClearStatistics();
- await (itemCache.ClearAsync(cancellationToken));
+ await (itemCache.ClearAsync(CancellationToken.None));
collectionCache.ClearStatistics();
- await (collectionCache.ClearAsync(cancellationToken));
+ await (collectionCache.ClearAsync(CancellationToken.None));
List items;
using (var s = OpenSession())
@@ -992,10 +992,10 @@ public async Task QueryCacheTestAsync()
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
.FetchMany(o => o.Items)
- .ToListAsync(cancellationToken));
+ .ToListAsync());
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(future ? 0 : 1), "Unexpected query cache GetCalls");
@@ -1018,9 +1018,9 @@ public async Task QueryCacheTestAsync()
if (clearEntityCacheAfterQuery)
{
- await (cache.ClearAsync(cancellationToken));
- await (collectionCache.ClearAsync(cancellationToken));
- await (itemCache.ClearAsync(cancellationToken));
+ await (cache.ClearAsync(CancellationToken.None));
+ await (collectionCache.ClearAsync(CancellationToken.None));
+ await (itemCache.ClearAsync(CancellationToken.None));
}
Sfi.Statistics.Clear();
@@ -1048,10 +1048,10 @@ public async Task QueryCacheTestAsync()
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
.FetchMany(o => o.Items)
- .ToListAsync(cancellationToken));
+ .ToListAsync());
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(future ? 0 : 1), "Unexpected query cache GetCalls");
@@ -1080,7 +1080,7 @@ public async Task QueryCacheTestAsync()
[TestCase(false, false)]
[TestCase(true, true)]
[TestCase(false, true)]
- public async Task QueryFetchEntityBatchCacheTestAsync(bool clearEntityCacheAfterQuery, bool future, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task QueryFetchEntityBatchCacheTestAsync(bool clearEntityCacheAfterQuery, bool future)
{
if (future && !Sfi.ConnectionProvider.Driver.SupportsMultipleQueries)
{
@@ -1097,17 +1097,17 @@ public async Task QueryCacheTestAsync()
using (var s = OpenSession())
{
- var ids = await (s.Query().Select(o => o.Id).OrderBy(o => o).ToListAsync(cancellationToken));
+ var ids = await (s.Query().Select(o => o.Id).OrderBy(o => o).ToListAsync());
middleId = ids[17];
}
Sfi.Statistics.Clear();
- await (Sfi.EvictQueriesAsync(cancellationToken));
+ await (Sfi.EvictQueriesAsync());
queryCache.ClearStatistics();
cache.ClearStatistics();
- await (cache.ClearAsync(cancellationToken));
+ await (cache.ClearAsync(CancellationToken.None));
parentCache.ClearStatistics();
- await (parentCache.ClearAsync(cancellationToken));
+ await (parentCache.ClearAsync(CancellationToken.None));
List items;
using (var s = OpenSession())
@@ -1133,10 +1133,10 @@ public async Task QueryCacheTestAsync()
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
.Fetch(o => o.Parent)
- .ToListAsync(cancellationToken));
+ .ToListAsync());
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(future ? 0 : 1), "Unexpected query cache GetCalls");
@@ -1158,8 +1158,8 @@ public async Task QueryCacheTestAsync()
if (clearEntityCacheAfterQuery)
{
- await (cache.ClearAsync(cancellationToken));
- await (parentCache.ClearAsync(cancellationToken));
+ await (cache.ClearAsync(CancellationToken.None));
+ await (parentCache.ClearAsync(CancellationToken.None));
}
Sfi.Statistics.Clear();
@@ -1187,10 +1187,10 @@ public async Task QueryCacheTestAsync()
items = await (s.Query()
.WithOptions(o => o.SetCacheable(true))
.Fetch(o => o.Parent)
- .ToListAsync(cancellationToken));
+ .ToListAsync());
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(queryCache.GetCalls, Has.Count.EqualTo(future ? 0 : 1), "Unexpected query cache GetCalls");
diff --git a/src/NHibernate.Test/Async/Component/Basic/ComponentTest.cs b/src/NHibernate.Test/Async/Component/Basic/ComponentTest.cs
index 62346be8e41..a3a058a3def 100644
--- a/src/NHibernate.Test/Async/Component/Basic/ComponentTest.cs
+++ b/src/NHibernate.Test/Async/Component/Basic/ComponentTest.cs
@@ -167,78 +167,6 @@ public async Task TestComponentStateChangeAndDirtinessAsync()
}
}
- [Test]
- [Ignore("Ported from Hibernate. Read properties not supported in NH yet.")]
- public async Task TestCustomColumnReadAndWriteAsync()
- {
- const double HEIGHT_INCHES = 73;
- const double HEIGHT_CENTIMETERS = HEIGHT_INCHES * 2.54d;
-
- using (ISession s = Sfi.OpenSession())
- using (ITransaction t = s.BeginTransaction())
- {
- User u = new User("steve", "hibernater", new Person( "Steve Ebersole", new DateTime(1999, 12, 31), "Main St"));
- u.Person.HeightInches = HEIGHT_INCHES;
- await (s.PersistAsync(u));
- await (s.FlushAsync());
-
- // Test value conversion during insert
- double heightViaSql = (double)await (s.CreateSQLQuery("select height_centimeters from t_user where t_user.username='steve'").UniqueResultAsync());
- Assert.That(heightViaSql, Is.EqualTo(HEIGHT_CENTIMETERS).Within(0.01d));
-
- // Test projection
- double heightViaHql = (double)await (s.CreateQuery("select u.Person.HeightInches from User u where u.Id = 'steve'").UniqueResultAsync());
- Assert.That(heightViaHql, Is.EqualTo(HEIGHT_INCHES).Within(0.01d));
-
- // Test restriction and entity load via criteria
- u = (User)await (s.CreateCriteria(typeof(User))
- .Add(Restrictions.Between("Person.HeightInches", HEIGHT_INCHES - 0.01d, HEIGHT_INCHES + 0.01d))
- .UniqueResultAsync());
- Assert.That(u.Person.HeightInches, Is.EqualTo(HEIGHT_INCHES).Within(0.01d));
-
- // Test predicate and entity load via HQL
- u = (User)await (s.CreateQuery("from User u where u.Person.HeightInches between ? and ?")
- .SetDouble(0, HEIGHT_INCHES - 0.01d)
- .SetDouble(1, HEIGHT_INCHES + 0.01d)
- .UniqueResultAsync());
-
- Assert.That(u.Person.HeightInches, Is.EqualTo(HEIGHT_INCHES).Within(0.01d));
-
- // Test update
- u.Person.HeightInches = 1;
- await (s.FlushAsync());
- heightViaSql = (double)await (s.CreateSQLQuery("select height_centimeters from t_user where t_user.username='steve'").UniqueResultAsync());
- Assert.That(heightViaSql, Is.EqualTo(2.54d).Within(0.01d));
- await (s.DeleteAsync(u));
- await (t.CommitAsync());
- s.Close();
- }
- }
-
- [Test]
- [Ignore("Ported from Hibernate - failing in NH")]
- public async Task TestComponentQueriesAsync()
- {
- using (ISession s = Sfi.OpenSession())
- using (ITransaction t = s.BeginTransaction())
- {
- Employee emp = new Employee();
- emp.HireDate = new DateTime(1999, 12, 31);
- emp.Person = new Person();
- emp.Person.Name = "steve";
- emp.Person.Dob = new DateTime(1999, 12, 31);
- await (s.SaveAsync(emp));
-
- await (s.CreateQuery("from Employee e where e.Person = :p and 1=1 and 2=2").SetParameter("p", emp.Person).ListAsync());
- await (s.CreateQuery("from Employee e where :p = e.Person").SetParameter("p", emp.Person).ListAsync());
- await (s.CreateQuery("from Employee e where e.Person = ('steve', current_timestamp)").ListAsync());
-
- await (s.DeleteAsync( emp ));
- await (t.CommitAsync());
- s.Close();
- }
- }
-
[Test]
public async Task TestComponentFormulaQueryAsync()
{
diff --git a/src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs b/src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs
index cba892a06aa..e6dbcc74f01 100644
--- a/src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs
+++ b/src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs
@@ -97,29 +97,6 @@ public async Task EscapeCharacterAsync()
}
}
- [Test, Ignore("ScrollableResults not implemented")]
- public async Task ScrollCriteriaAsync()
- {
- ISession session = OpenSession();
- ITransaction t = session.BeginTransaction();
-
- Course course = new Course();
- course.CourseCode = "HIB";
- course.Description = "Hibernate Training";
- await (session.SaveAsync(course));
- await (session.FlushAsync());
- session.Clear();
- //IScrollableResults sr = session.CreateCriteria(typeof(Course)).Scroll();
- //Assert.IsTrue( sr.Next() );
- //course = (Course) sr[0];
- Assert.IsNotNull(course);
- //sr.Close();
- await (session.DeleteAsync(course));
-
- await (t.CommitAsync());
- session.Close();
- }
-
[Test]
public async Task AllowToSetLimitOnSubqueriesAsync()
{
@@ -825,93 +802,6 @@ public async Task ProjectionCacheAsync()
s.Close();
}
- [Test, Ignore("Not supported.")]
- public async Task NH_1155_ShouldNotLoadAllChildrenInPagedSubSelectAsync()
- {
- if (this.Dialect.GetType().Equals((typeof(MsSql2000Dialect))))
- Assert.Ignore("This is not fixed for SQL 2000 Dialect");
-
- using (ISession s = OpenSession())
- using (ITransaction tx = s.BeginTransaction())
- {
- Course course = new Course();
- course.CourseCode = "HIB";
- course.Description = "Hibernate Training";
- await (s.SaveAsync(course));
-
-
- Student gavin = new Student();
- gavin.Name = "Gavin King";
- gavin.StudentNumber = 667;
- await (s.SaveAsync(gavin));
-
- Student ayende = new Student();
- ayende.Name = "Ayende Rahien";
- ayende.StudentNumber = 1337;
- await (s.SaveAsync(ayende));
-
-
- Student xam = new Student();
- xam.Name = "Max Rydahl Andersen";
- xam.StudentNumber = 101;
- await (s.SaveAsync(xam));
-
- Enrolment enrolment = new Enrolment();
- enrolment.Course = course;
- enrolment.CourseCode = course.CourseCode;
- enrolment.Semester = 1;
- enrolment.Year = 1999;
- enrolment.Student = xam;
- enrolment.StudentNumber = xam.StudentNumber;
- xam.Enrolments.Add(enrolment);
- await (s.SaveAsync(enrolment));
-
- enrolment = new Enrolment();
- enrolment.Course = course;
- enrolment.CourseCode = course.CourseCode;
- enrolment.Semester = 3;
- enrolment.Year = 1998;
- enrolment.Student = ayende;
- enrolment.StudentNumber = ayende.StudentNumber;
- ayende.Enrolments.Add(enrolment);
- await (s.SaveAsync(enrolment));
- await (tx.CommitAsync());
- }
-
- using (ISession s = OpenSession())
- {
- IList list = await (s.CreateCriteria(typeof(Student))
- .SetFirstResult(1)
- .SetMaxResults(10)
- .AddOrder(Order.Asc("StudentNumber"))
- .ListAsync());
- foreach (Student student in list)
- {
- foreach (Enrolment enrolment in student.Enrolments)
- {
- await (NHibernateUtil.InitializeAsync(enrolment));
- }
- }
-
- Enrolment key = new Enrolment();
- key.CourseCode = "HIB";
- key.StudentNumber = 101;// xam
- //since we didn't load xam's entrollments before (skipped by orderring)
- //it should not be already loaded
- Enrolment shouldNotBeLoaded = (Enrolment)await (s.LoadAsync(typeof(Enrolment), key));
- Assert.IsFalse(NHibernateUtil.IsInitialized(shouldNotBeLoaded));
- }
-
- using (ISession s = OpenSession())
- using (ITransaction tx = s.BeginTransaction())
- {
- await (s.DeleteAsync("from Enrolment"));
- await (s.DeleteAsync("from Student"));
- await (s.DeleteAsync("from Course"));
- await (tx.CommitAsync());
- }
- }
-
[Test]
public async Task ProjectionsTestAsync()
{
diff --git a/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs b/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs
index d6a85b966c0..244678c5c05 100644
--- a/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs
+++ b/src/NHibernate.Test/Async/FetchLazyProperties/FetchLazyPropertiesFixture.cs
@@ -20,7 +20,6 @@
namespace NHibernate.Test.FetchLazyProperties
{
using System.Threading.Tasks;
- using System.Threading;
[TestFixture]
public class FetchLazyPropertiesFixtureAsync : TestCase
{
@@ -201,16 +200,16 @@ private static void AssertFetchProperty(Person person)
[TestCase(true)]
[TestCase(false)]
- public async Task TestHqlFetchComponentAndFormulaTwoQueryReadOnlyAsync(bool readOnly, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestHqlFetchComponentAndFormulaTwoQueryReadOnlyAsync(bool readOnly)
{
Person person;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.CreateQuery("from Person fetch Address where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
- person = await (s.CreateQuery("from Person fetch Formula where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person fetch Address where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
+ person = await (s.CreateQuery("from Person fetch Formula where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
AssertFetchComponentAndFormulaTwoQuery(person);
@@ -218,16 +217,16 @@ private static void AssertFetchProperty(Person person)
[TestCase(true)]
[TestCase(false)]
- public async Task TestLinqFetchComponentAndFormulaTwoQueryAsync(bool readOnly, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestLinqFetchComponentAndFormulaTwoQueryAsync(bool readOnly)
{
Person person;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.Query().Fetch(o => o.Address).WithOptions(o => o.SetReadOnly(readOnly)).FirstOrDefaultAsync(o => o.Id == 1, cancellationToken));
- person = await (s.Query().Fetch(o => o.Formula).WithOptions(o => o.SetReadOnly(readOnly)).FirstOrDefaultAsync(o => o.Id == 1, cancellationToken));
+ person = await (s.Query().Fetch(o => o.Address).WithOptions(o => o.SetReadOnly(readOnly)).FirstOrDefaultAsync(o => o.Id == 1));
+ person = await (s.Query().Fetch(o => o.Formula).WithOptions(o => o.SetReadOnly(readOnly)).FirstOrDefaultAsync(o => o.Id == 1));
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
AssertFetchComponentAndFormulaTwoQuery(person);
@@ -373,13 +372,13 @@ private static void AssertFetchFormulaAndManyToOneComponent(Person person)
[TestCase(true)]
[TestCase(false)]
- public async Task TestHqlFetchFormulaAndManyToOneComponentListAsync(bool descending, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestHqlFetchFormulaAndManyToOneComponentListAsync(bool descending)
{
Person person;
using (var s = OpenSession())
{
person = (await (s.CreateQuery("from Person p fetch p.Formula left join fetch p.BestFriend bf fetch bf.Address order by p.Id" + (descending ? " desc" : ""))
- .ListAsync(cancellationToken))).FirstOrDefault(o => o.Id == 1);
+ .ListAsync())).FirstOrDefault(o => o.Id == 1);
}
AssertFetchFormulaAndManyToOneComponentList(person);
@@ -387,7 +386,7 @@ private static void AssertFetchFormulaAndManyToOneComponent(Person person)
[TestCase(true)]
[TestCase(false)]
- public async Task TestLinqFetchFormulaAndManyToOneComponentListAsync(bool descending, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestLinqFetchFormulaAndManyToOneComponentListAsync(bool descending)
{
Person person;
using (var s = OpenSession())
@@ -397,7 +396,7 @@ private static void AssertFetchFormulaAndManyToOneComponent(Person person)
.Fetch(o => o.BestFriend).ThenFetch(o => o.Address);
query = descending ? query.OrderByDescending(o => o.Id) : query.OrderBy(o => o.Id);
person = (await (query
- .ToListAsync(cancellationToken)))
+ .ToListAsync()))
.FirstOrDefault(o => o.Id == 1);
}
@@ -838,17 +837,17 @@ public async Task TestHqlFetchComponentAliasAsync()
[TestCase(true)]
[TestCase(false)]
- public async Task TestFetchComponentAndFormulaTwoQueryCacheAsync(bool readOnly, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestFetchComponentAndFormulaTwoQueryCacheAsync(bool readOnly)
{
- await (TestLinqFetchComponentAndFormulaTwoQueryAsync(readOnly, cancellationToken));
+ await (TestLinqFetchComponentAndFormulaTwoQueryAsync(readOnly));
Person person;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.GetAsync(1, cancellationToken));
+ person = await (s.GetAsync(1));
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
AssertFetchComponentAndFormulaTwoQuery(person);
@@ -893,17 +892,17 @@ public async Task TestFetchComponentCacheAsync()
[TestCase(true)]
[TestCase(false)]
- public async Task TestFetchAfterPropertyIsInitializedAsync(bool readOnly, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestFetchAfterPropertyIsInitializedAsync(bool readOnly)
{
Person person;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.CreateQuery("from Person fetch Address where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person fetch Address where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
person.Image = new byte[10];
- person = await (s.CreateQuery("from Person fetch Image where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person fetch Image where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(NHibernateUtil.IsPropertyInitialized(person, "Image"), Is.True);
@@ -915,10 +914,10 @@ public async Task TestFetchComponentCacheAsync()
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.CreateQuery("from Person where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
person.Image = new byte[1];
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(NHibernateUtil.IsPropertyInitialized(person, "Image"), Is.True);
@@ -928,17 +927,17 @@ public async Task TestFetchComponentCacheAsync()
[TestCase(true)]
[TestCase(false)]
- public async Task TestFetchAfterEntityIsInitializedAsync(bool readOnly, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestFetchAfterEntityIsInitializedAsync(bool readOnly)
{
Person person;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- person = await (s.CreateQuery("from Person where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
var image = person.Image;
- person = await (s.CreateQuery("from Person fetch Image where Id = 1").SetReadOnly(readOnly).UniqueResultAsync(cancellationToken));
+ person = await (s.CreateQuery("from Person fetch Image where Id = 1").SetReadOnly(readOnly).UniqueResultAsync());
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(NHibernateUtil.IsPropertyInitialized(person, "Image"), Is.True);
diff --git a/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs b/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs
index 5fc2a393c04..655ecdbe9cf 100644
--- a/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs
+++ b/src/NHibernate.Test/Async/Generatedkeys/Identity/IdentityGeneratedKeysTest.cs
@@ -52,127 +52,5 @@ public async Task IdentityColumnGeneratedIdsAsync()
await (s.Transaction.CommitAsync());
s.Close();
}
-
- [Test, Ignore("Not supported yet.")]
- public async Task PersistOutsideTransactionAsync()
- {
- ISession s = OpenSession();
-
- // first test save() which should force an immediate insert...
- MyEntity myEntity1 = new MyEntity("test-save");
- long id = (long)await (s.SaveAsync(myEntity1));
- Assert.IsNotNull(id, "identity column did not force immediate insert");
- Assert.AreEqual(id, myEntity1.Id);
-
- // next test persist() which should cause a delayed insert...
- long initialInsertCount = Sfi.Statistics.EntityInsertCount;
- MyEntity myEntity2 = new MyEntity("test-persist");
- await (s.PersistAsync(myEntity2));
- Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed");
- Assert.AreEqual(0,myEntity2.Id);
-
- // an explicit flush should cause execution of the delayed insertion
- await (s.FlushAsync());
- Assert.AreEqual(initialInsertCount + 1, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush");
- s.Close();
-
- s = OpenSession();
- s.BeginTransaction();
- await (s.DeleteAsync(myEntity1));
- await (s.DeleteAsync(myEntity2));
- await (s.Transaction.CommitAsync());
- s.Close();
- }
-
- [Test, Ignore("Not supported yet.")]
- public async Task PersistOutsideTransactionCascadedToNonInverseCollectionAsync()
- {
- long initialInsertCount = Sfi.Statistics.EntityInsertCount;
- ISession s = OpenSession();
- MyEntity myEntity = new MyEntity("test-persist");
- myEntity.NonInverseChildren.Add(new MyChild("test-child-persist-non-inverse"));
- await (s.PersistAsync(myEntity));
- Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed");
- Assert.AreEqual(0, myEntity.Id);
- await (s.FlushAsync());
- Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount,"delayed persist insert not executed on flush");
- s.Close();
-
- s = OpenSession();
- s.BeginTransaction();
- await (s.DeleteAsync("from MyChild"));
- await (s.DeleteAsync("from MyEntity"));
- await (s.Transaction.CommitAsync());
- s.Close();
- }
-
- [Test, Ignore("Not supported yet.")]
- public async Task PersistOutsideTransactionCascadedToInverseCollectionAsync()
- {
- long initialInsertCount = Sfi.Statistics.EntityInsertCount;
- ISession s = OpenSession();
- MyEntity myEntity2 = new MyEntity("test-persist-2");
- MyChild child = new MyChild("test-child-persist-inverse");
- myEntity2.InverseChildren.Add(child);
- child.InverseParent= myEntity2;
- await (s.PersistAsync(myEntity2));
- Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount,"persist on identity column not delayed");
- Assert.AreEqual(0, myEntity2.Id);
- await (s.FlushAsync());
- Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount,"delayed persist insert not executed on flush");
- s.Close();
-
- s = OpenSession();
- s.BeginTransaction();
- await (s.DeleteAsync("from MyChild"));
- await (s.DeleteAsync("from MyEntity"));
- await (s.Transaction.CommitAsync());
- s.Close();
- }
-
- [Test, Ignore("Not supported yet.")]
- public async Task PersistOutsideTransactionCascadedToManyToOneAsync()
- {
- long initialInsertCount = Sfi.Statistics.EntityInsertCount;
- ISession s = OpenSession();
- MyEntity myEntity = new MyEntity("test-persist");
- myEntity.Sibling=new MySibling("test-persist-sibling-out");
- await (s.PersistAsync(myEntity));
- Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed");
- Assert.AreEqual(0, myEntity.Id);
- await (s.FlushAsync());
- Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush");
- s.Close();
-
- s = OpenSession();
- s.BeginTransaction();
- await (s.DeleteAsync("from MyEntity"));
- await (s.DeleteAsync("from MySibling"));
- await (s.Transaction.CommitAsync());
- s.Close();
- }
-
- [Test, Ignore("Not supported yet.")]
- public async Task PersistOutsideTransactionCascadedFromManyToOneAsync()
- {
- long initialInsertCount = Sfi.Statistics.EntityInsertCount;
- ISession s = OpenSession();
- MyEntity myEntity2 = new MyEntity("test-persist-2");
- MySibling sibling = new MySibling("test-persist-sibling-in");
- sibling.Entity= myEntity2;
- await (s.PersistAsync(sibling));
- Assert.AreEqual(initialInsertCount, Sfi.Statistics.EntityInsertCount, "persist on identity column not delayed");
- Assert.AreEqual(0, myEntity2.Id);
- await (s.FlushAsync());
- Assert.AreEqual(initialInsertCount + 2, Sfi.Statistics.EntityInsertCount, "delayed persist insert not executed on flush");
- s.Close();
-
- s = OpenSession();
- s.BeginTransaction();
- await (s.DeleteAsync("from MySibling"));
- await (s.DeleteAsync("from MyEntity"));
- await (s.Transaction.CommitAsync());
- s.Close();
- }
}
}
diff --git a/src/NHibernate.Test/Async/GhostProperty/GhostPropertyFixture.cs b/src/NHibernate.Test/Async/GhostProperty/GhostPropertyFixture.cs
index 5a0aac53159..85d00197b0e 100644
--- a/src/NHibernate.Test/Async/GhostProperty/GhostPropertyFixture.cs
+++ b/src/NHibernate.Test/Async/GhostProperty/GhostPropertyFixture.cs
@@ -180,18 +180,6 @@ public async Task GhostPropertyMaintainIdentityMapAsync()
}
}
- [Test, Ignore("This shows an expected edge case")]
- public async Task GhostPropertyMaintainIdentityMapUsingGetAsync()
- {
- using (ISession s = OpenSession())
- {
- var payment = await (s.LoadAsync(1));
- var order = await (s.GetAsync(1));
-
- Assert.AreSame(order.Payment, payment);
- }
- }
-
[Test]
public async Task WillLoadGhostAssociationOnAccessAsync()
{
diff --git a/src/NHibernate.Test/Async/Hql/Ast/HqlFixture.cs b/src/NHibernate.Test/Async/Hql/Ast/HqlFixture.cs
index 3a0c9a92244..b397e9412b4 100644
--- a/src/NHibernate.Test/Async/Hql/Ast/HqlFixture.cs
+++ b/src/NHibernate.Test/Async/Hql/Ast/HqlFixture.cs
@@ -234,31 +234,6 @@ public async Task SubselectAdditionAsync()
}
}
- [Test, Ignore("Not fixed yet.")]
- public async Task SumShouldReturnDoubleAsync()
- {
- // NH-1734
- using (ISession s = OpenSession())
- using (s.BeginTransaction())
- {
- await (s.SaveAsync(new Human{ IntValue = 11, BodyWeight = 12.5f, Description = "Polliwog" }));
- await (s.Transaction.CommitAsync());
- }
-
- using (ISession s = OpenSession())
- {
- var l = await (s.CreateQuery("select sum(a.intValue * a.bodyWeight) from Animal a group by a.id").ListAsync());
- Assert.That(l[0], Is.InstanceOf());
- }
-
- using (ISession s = OpenSession())
- using (s.BeginTransaction())
- {
- await (s.CreateQuery("delete from Animal").ExecuteUpdateAsync());
- await (s.Transaction.CommitAsync());
- }
- }
-
[Test]
public async Task CanParseMaxLongAsync()
{
diff --git a/src/NHibernate.Test/Async/Hql/EntityJoinHqlTest.cs b/src/NHibernate.Test/Async/Hql/EntityJoinHqlTest.cs
index e6041310ee1..17b11403da4 100644
--- a/src/NHibernate.Test/Async/Hql/EntityJoinHqlTest.cs
+++ b/src/NHibernate.Test/Async/Hql/EntityJoinHqlTest.cs
@@ -275,22 +275,6 @@ public async Task EntityJoinWithFetchesAsync()
}
}
- [Test, Ignore("Failing for unrelated reasons")]
- public async Task CrossJoinAndWithClauseAsync()
- {
- //This is about complex theta style join fix that was implemented in hibernate along with entity join functionality
- //https://hibernate.atlassian.net/browse/HHH-7321
- using (var sqlLog = new SqlLogSpy())
- using (var session = OpenSession())
- {
- await (session.CreateQuery(
- "SELECT s " +
- "FROM EntityComplex s, EntityComplex q " +
- "LEFT JOIN s.SameTypeChild AS sa WITH sa.SameTypeChild.Id = q.SameTypeChild.Id"
- ).ListAsync());
- }
- }
-
#region Test Setup
protected override HbmMapping GetMappings()
diff --git a/src/NHibernate.Test/Async/Hql/HQLFunctions.cs b/src/NHibernate.Test/Async/Hql/HQLFunctions.cs
index a67a8ad518a..74df40cd536 100644
--- a/src/NHibernate.Test/Async/Hql/HQLFunctions.cs
+++ b/src/NHibernate.Test/Async/Hql/HQLFunctions.cs
@@ -1257,40 +1257,6 @@ public async Task NH1725Async()
}
}
- [Test, Ignore("Not supported yet!")]
- public async Task ParameterLikeArgumentAsync()
- {
- using (ISession s = OpenSession())
- {
- Animal a1 = new Animal("abcdef", 1.3f);
- await (s.SaveAsync(a1));
- await (s.FlushAsync());
- }
-
- using (ISession s = OpenSession())
- {
- string hql;
- IList l;
- Animal result;
-
- // Render in WHERE
- hql = "from Animal a where cast(:aParam as Double)>0";
- result = (Animal)await (s.CreateQuery(hql).SetDouble("aParam", 2D).UniqueResultAsync());
- Assert.IsNotNull(result);
-
- // Render in WHERE with math operation
- hql = "from Animal a where cast(:aParam+a.BodyWeight as Double)>3";
- result = (Animal) await (s.CreateQuery(hql).SetDouble("aParam", 2D).UniqueResultAsync());
- Assert.IsNotNull(result);
-
- // Render in all clauses
- hql =
- "select cast(:aParam+a.BodyWeight as int) from Animal a group by cast(:aParam+a.BodyWeight as int) having cast(:aParam+a.BodyWeight as Double)>0";
- l = await (s.CreateQuery(hql).SetInt32("aParam", 10).ListAsync());
- Assert.AreEqual(1, l.Count);
- }
- }
-
[Test]
public async Task BitwiseAndAsync()
{
diff --git a/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs b/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs
index 149e7b001f7..4ec41663136 100644
--- a/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs
+++ b/src/NHibernate.Test/Async/LazyGroup/LazyGroupFixture.cs
@@ -99,14 +99,14 @@ public async Task TestGroupsAsync()
[TestCase(true)]
[TestCase(false)]
- public async Task TestUpdateAsync(bool fetchBeforeUpdate, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task TestUpdateAsync(bool fetchBeforeUpdate)
{
Sfi.Statistics.Clear();
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- var person = await (s.GetAsync(1, cancellationToken));
+ var person = await (s.GetAsync(1));
if (fetchBeforeUpdate)
{
var nickName = person.NickName;
@@ -114,7 +114,7 @@ public async Task TestGroupsAsync()
person.NickName = "test";
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(Sfi.Statistics.EntityUpdateCount, Is.EqualTo(1));
@@ -122,12 +122,12 @@ public async Task TestGroupsAsync()
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- var person = await (s.GetAsync(1, cancellationToken));
+ var person = await (s.GetAsync(1));
Assert.That(person.NickName, Is.EqualTo("test"));
person.NickName = "NickName1"; // reset name
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
}
diff --git a/src/NHibernate.Test/Async/LazyProperty/LazyPropertyFixture.cs b/src/NHibernate.Test/Async/LazyProperty/LazyPropertyFixture.cs
index cb8dc0298de..3b4405eb6a7 100644
--- a/src/NHibernate.Test/Async/LazyProperty/LazyPropertyFixture.cs
+++ b/src/NHibernate.Test/Async/LazyProperty/LazyPropertyFixture.cs
@@ -21,7 +21,6 @@
namespace NHibernate.Test.LazyProperty
{
using System.Threading.Tasks;
- using System.Threading;
[TestFixture]
public class LazyPropertyFixtureAsync : TestCase
{
@@ -152,25 +151,25 @@ public async Task CanSetValueForLazyPropertyAsync()
[TestCase(false)]
[TestCase(true)]
- public async Task CanUpdateValueForLazyPropertyAsync(bool initializeAfterSet, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task CanUpdateValueForLazyPropertyAsync(bool initializeAfterSet)
{
Book book;
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- book = await (s.GetAsync(1, cancellationToken));
+ book = await (s.GetAsync(1));
book.ALotOfText = "update-text";
if (initializeAfterSet)
{
var image = book.Image;
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
using (var s = OpenSession())
{
- book = await (s.GetAsync(1, cancellationToken));
+ book = await (s.GetAsync(1));
var text = book.ALotOfText;
}
@@ -182,14 +181,14 @@ public async Task CanSetValueForLazyPropertyAsync()
[TestCase(false)]
[TestCase(true)]
- public async Task UpdateValueForLazyPropertyToSameValueAsync(bool initializeAfterSet, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task UpdateValueForLazyPropertyToSameValueAsync(bool initializeAfterSet)
{
Book book;
string text;
using (var s = OpenSession())
{
- book = await (s.GetAsync(1, cancellationToken));
+ book = await (s.GetAsync(1));
text = book.ALotOfText;
}
@@ -198,14 +197,14 @@ public async Task CanSetValueForLazyPropertyAsync()
using (var s = OpenSession())
using (var tx = s.BeginTransaction())
{
- book = await (s.GetAsync(1, cancellationToken));
+ book = await (s.GetAsync(1));
book.ALotOfText = text;
if (initializeAfterSet)
{
var image = book.Image;
}
- await (tx.CommitAsync(cancellationToken));
+ await (tx.CommitAsync());
}
Assert.That(Sfi.Statistics.EntityUpdateCount, Is.EqualTo(initializeAfterSet ? 0 : 1));
@@ -215,7 +214,7 @@ public async Task CanSetValueForLazyPropertyAsync()
using (var s = OpenSession())
{
- book = await (s.GetAsync(1, cancellationToken));
+ book = await (s.GetAsync(1));
text = book.ALotOfText;
}
diff --git a/src/NHibernate.Test/Async/Legacy/ABCProxyTest.cs b/src/NHibernate.Test/Async/Legacy/ABCProxyTest.cs
index 135f8876840..3804e300925 100644
--- a/src/NHibernate.Test/Async/Legacy/ABCProxyTest.cs
+++ b/src/NHibernate.Test/Async/Legacy/ABCProxyTest.cs
@@ -275,39 +275,6 @@ public async Task SubclassMapAsync()
s.Close();
}
- [Test, Ignore("ANTLR parser : Not supported ")]
- public async Task OnoToOneComparingAsync()
- {
- A a = new A();
- E d1 = new E();
- C1 c = new C1();
- E d2 = new E();
- a.Forward = d1;
- d1.Reverse = a;
- c.Forward = d2;
- d2.Reverse = c;
-
- using (ISession s = OpenSession())
- using (ITransaction t = s.BeginTransaction())
- {
- await (s.SaveAsync(a));
- await (s.SaveAsync(d2));
- await (t.CommitAsync());
- }
- using (ISession s = OpenSession())
- {
- IList l = await (s.CreateQuery("from E e, A a where e.Reverse = a.Forward and a = ?").SetEntity(0, a).ListAsync());
- Assert.AreEqual(1, l.Count);
- }
- using (ISession s = OpenSession())
- using (ITransaction t = s.BeginTransaction())
- {
- await (s.DeleteAsync("from A"));
- await (s.DeleteAsync("from E"));
- await (t.CommitAsync());
- }
- }
-
[Test]
public async Task OneToOneAsync()
{
diff --git a/src/NHibernate.Test/Async/Legacy/SQLFunctionsTest.cs b/src/NHibernate.Test/Async/Legacy/SQLFunctionsTest.cs
index 44a9c7d1556..ff9e5bf2d20 100644
--- a/src/NHibernate.Test/Async/Legacy/SQLFunctionsTest.cs
+++ b/src/NHibernate.Test/Async/Legacy/SQLFunctionsTest.cs
@@ -115,23 +115,6 @@ public async Task DialectSQLFunctionsAsync()
s.Close();
}
- [Test]
- [Ignore("NH-3893 is not fixed")]
- public async Task LeftAndRightAsync()
- {
- // As of NH-3893, left and right functions are broken. Seemed confused with join keyword, and not
- // supported on Hibernate side.
- using (var s = OpenSession())
- using (var t = s.BeginTransaction())
- {
- var rset = await (s.CreateQuery("select left('abc', 2), right('abc', 2) from s in class Simple").ListAsync