You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# SQLiteEfCodeFirstDbCreator
2
2
Creates a [SQLite Database](https://sqlite.org/) from Code, using [Entity Framework](https://msdn.microsoft.com/en-us/data/ef.aspx) CodeFirst.
3
3
4
-
This Project ships a "SqliteContextInitializer" which creates a new SQLite Database, based on your model/code.
4
+
This Project ships a `SqliteContextInitializer` which creates a new SQLite Database, based on your model/code.
5
5
I started with the code from flaub: https://gist.github.com/flaub/1968486e1b3f2b9fddaf
6
6
7
7
Currently the following is supported:
@@ -34,7 +34,8 @@ public class MyDbContext : DbContext
34
34
```
35
35
36
36
In a more advanced szenario you may want to populate some core- or test-data after the database was created.
37
-
To do this, inherit from `SqliteContextInitializer<>`
37
+
To do this, inherit from `SqliteContextInitializer<>` and override the `Seed(TestDbContext context)` function.
38
+
This function will be called, in a own transaction, right after the database was created. This function is only executed if a new database was successfully created.
0 commit comments