File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
SQLite.CodeFirst/DbInitializers Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -87,25 +87,12 @@ public override void InitializeDatabase(TContext context)
8787 }
8888 }
8989
90- private void DeleteDatabase ( TContext context , string databseFilePath )
90+ private static void DeleteDatabase ( TContext context , string databseFilePath )
9191 {
9292 context . Database . Connection . Close ( ) ;
9393 GC . Collect ( ) ;
94-
95- // TODO: Comment
96- for ( int i = 0 ; i < 5 ; i ++ )
97- {
98- try
99- {
100- File . Delete ( databseFilePath ) ;
101- // TODO: Throw exception if 5 tries..
102- break ;
103- }
104- catch ( Exception )
105- {
106- System . Threading . Thread . Sleep ( 1 ) ;
107- }
108- }
94+ GC . WaitForPendingFinalizers ( ) ;
95+ File . Delete ( databseFilePath ) ;
10996 }
11097
11198 private void SaveHistory ( TContext context )
You can’t perform that action at this time.
0 commit comments