File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed
Async/NHSpecificTest/NH3813 Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,8 @@ public async Task FetchInitializesAllCollectionsAsync()
152
152
153
153
protected override void OnSetUp ( )
154
154
{
155
- base . OnSetUp ( ) ;
156
-
157
- using ( ISession s = OpenSession ( ) )
158
- using ( ITransaction t = s . BeginTransaction ( ) )
155
+ using ( var s = OpenSession ( ) )
156
+ using ( var t = s . BeginTransaction ( ) )
159
157
{
160
158
// a record that has association records will be loaded regularly
161
159
var withAssociations = new FirstTable ( ) ;
@@ -180,16 +178,12 @@ protected override void OnSetUp()
180
178
181
179
protected override void OnTearDown ( )
182
180
{
183
- using ( ISession s = OpenSession ( ) )
184
- using ( ITransaction t = s . BeginTransaction ( ) )
181
+ using ( var s = OpenSession ( ) )
182
+ using ( var t = s . BeginTransaction ( ) )
185
183
{
186
- s . Delete ( "from AssociationTable" ) ;
187
- s . Delete ( "from OtherTable" ) ;
188
- s . Delete ( "from FirstTable" ) ;
184
+ s . CreateQuery ( "delete from System.Object" ) . ExecuteUpdate ( ) ;
189
185
t . Commit ( ) ;
190
186
}
191
-
192
- base . OnTearDown ( ) ;
193
187
}
194
188
}
195
189
}
Original file line number Diff line number Diff line change @@ -141,10 +141,8 @@ public void FetchInitializesAllCollections()
141
141
142
142
protected override void OnSetUp ( )
143
143
{
144
- base . OnSetUp ( ) ;
145
-
146
- using ( ISession s = OpenSession ( ) )
147
- using ( ITransaction t = s . BeginTransaction ( ) )
144
+ using ( var s = OpenSession ( ) )
145
+ using ( var t = s . BeginTransaction ( ) )
148
146
{
149
147
// a record that has association records will be loaded regularly
150
148
var withAssociations = new FirstTable ( ) ;
@@ -169,16 +167,12 @@ protected override void OnSetUp()
169
167
170
168
protected override void OnTearDown ( )
171
169
{
172
- using ( ISession s = OpenSession ( ) )
173
- using ( ITransaction t = s . BeginTransaction ( ) )
170
+ using ( var s = OpenSession ( ) )
171
+ using ( var t = s . BeginTransaction ( ) )
174
172
{
175
- s . Delete ( "from AssociationTable" ) ;
176
- s . Delete ( "from OtherTable" ) ;
177
- s . Delete ( "from FirstTable" ) ;
173
+ s . CreateQuery ( "delete from System.Object" ) . ExecuteUpdate ( ) ;
178
174
t . Commit ( ) ;
179
175
}
180
-
181
- base . OnTearDown ( ) ;
182
176
}
183
177
}
184
178
}
You can’t perform that action at this time.
0 commit comments