File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Async/NHSpecificTest/GH2552 Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 10
10
11
11
using System ;
12
12
using System . Collections . Generic ;
13
- using System . Reflection ;
14
- using NHibernate . Cache ;
13
+ using System . Linq ;
15
14
using NHibernate . Stat ;
16
- using NHibernate . Test . CacheTest . Caches ;
17
15
using NUnit . Framework ;
18
16
using NHCfg = NHibernate . Cfg ;
17
+ using NHibernate . Linq ;
19
18
20
19
namespace NHibernate . Test . NHSpecificTest . GH2552
21
20
{
@@ -133,15 +132,14 @@ protected override void OnTearDown()
133
132
using ( ITransaction tx = s . BeginTransaction ( ) )
134
133
{
135
134
// Get the first person with details.
136
- Person person = await ( s . QueryOver < TPerson > ( )
135
+ Person person = await ( s . Query < TPerson > ( )
137
136
. Where ( p => p . Details != null )
138
137
. Take ( 1 )
139
138
. SingleOrDefaultAsync ( cancellationToken ) ) ;
140
139
141
140
Assert . NotNull ( person ) ;
142
141
Assert . NotNull ( person . Details ) ;
143
142
144
- await ( s . SaveOrUpdateAsync ( person , cancellationToken ) ) ;
145
143
person . Details = null ;
146
144
147
145
await ( tx . CommitAsync ( cancellationToken ) ) ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
- using System . Reflection ;
4
- using NHibernate . Cache ;
3
+ using System . Linq ;
5
4
using NHibernate . Stat ;
6
- using NHibernate . Test . CacheTest . Caches ;
7
5
using NUnit . Framework ;
8
6
using NHCfg = NHibernate . Cfg ;
9
7
@@ -121,15 +119,14 @@ private int DeleteDetailsFromFirstPerson<TPerson>() where TPerson:Person
121
119
using ( ITransaction tx = s . BeginTransaction ( ) )
122
120
{
123
121
// Get the first person with details.
124
- Person person = s . QueryOver < TPerson > ( )
122
+ Person person = s . Query < TPerson > ( )
125
123
. Where ( p => p . Details != null )
126
124
. Take ( 1 )
127
125
. SingleOrDefault ( ) ;
128
126
129
127
Assert . NotNull ( person ) ;
130
128
Assert . NotNull ( person . Details ) ;
131
129
132
- s . SaveOrUpdate ( person ) ;
133
130
person . Details = null ;
134
131
135
132
tx . Commit ( ) ;
You can’t perform that action at this time.
0 commit comments