Skip to content

Commit 56baccc

Browse files
author
Marc Sallin
committed
Update README.md
1 parent 5301584 commit 56baccc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SQLiteEfCodeFirstDbCreator
22
Creates a [SQLite Database](https://sqlite.org/) from Code, using [Entity Framework](https://msdn.microsoft.com/en-us/data/ef.aspx) CodeFirst.
33

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.
55
I started with the code from flaub: https://gist.github.com/flaub/1968486e1b3f2b9fddaf
66

77
Currently the following is supported:
@@ -34,7 +34,8 @@ public class MyDbContext : DbContext
3434
```
3535

3636
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.
3839
```csharp
3940
public class TestDbContextInitializer : SqliteContextInitializer<TestDbContext>
4041
{

0 commit comments

Comments
 (0)