We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4d0193 commit c5f7c20Copy full SHA for c5f7c20
1 file changed
SQLite.CodeFirst/SqliteInitializerBase.cs
@@ -2,6 +2,7 @@
2
using System.Data.Entity;
3
using System.Data.Entity.ModelConfiguration.Conventions;
4
using SQLite.CodeFirst.Convention;
5
+using System.IO;
6
7
namespace SQLite.CodeFirst
8
{
@@ -60,15 +61,10 @@ public virtual void InitializeDatabase(TContext context)
60
61
62
var model = modelBuilder.Build(context.Database.Connection);
63
- //mprattinger: Possible fix for #45
64
var dbFile = GetDatabasePathFromContext(context);
65
- var dbFileInfo = new System.IO.FileInfo(dbFile);
66
- if (!dbFileInfo.Directory.Exists)
67
- {
68
- //DBPath doesn't exist -> create it:
69
- dbFileInfo.Directory.Create();
70
- }
71
- //mprattinger
+ var dbFileInfo = new FileInfo(dbFile);
+ dbFileInfo.Directory.Create();
+
72
73
using (var transaction = context.Database.BeginTransaction())
74
0 commit comments